Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are the .html extensions really necessary in URLs? #2250

Closed
ilg-ul opened this issue Apr 19, 2023 · 8 comments
Closed

Are the .html extensions really necessary in URLs? #2250

ilg-ul opened this issue Apr 19, 2023 · 8 comments
Labels
question Question about functionality

Comments

@ilg-ul
Copy link

ilg-ul commented Apr 19, 2023

Search terms

URL, html

Question

I was wondering whether the use of explicit .html file extensions in the URLs generated by TypeDoc is of any special value, compared to the shorter folder type URLs.

For example the Logger class in one of my projects has the following URL:

https://xpack.github.io/logger-ts/classes/Logger.html

Personally I expected something like:

https://xpack.github.io/logger-ts/classes/Logger/

In my opinion, the second URL is generally preferred, as being easier to use as a link and (subjectively) looking nicer.

Is there any reason (that I'm missing) for using the .html URLs?

@ilg-ul ilg-ul added the question Question about functionality label Apr 19, 2023
@RunDevelopment
Copy link
Contributor

@Gerrit0 mentioned before that they still want typedoc to support not using a web server.

Right now, you just open any typedoc-generated HTML file locally (e.g. file:///path/to/repo/docs/index.html) and all links in it will work. But this will not work with /Logger/-type links, because the browser will just show this:
image

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 19, 2023

Yep, exactly, eventually I want to do #2111, which will enable this, among other things, but haven't gotten around to doing it yet.

@ilg-ul
Copy link
Author

ilg-ul commented Apr 19, 2023

Yeah, opening the site locally might be useful while initially working on the configuration, but all my other web projects come with a way to start a simple local browser, on a localhost port, and I never felt the need to open the site directly from the file system. I guess that it wouldn't be very difficult to add this functionality to typedoc too; or add a separate command for this.

It would be useful that a future version to generate sites without the .html extensions.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 19, 2023

Even if nobody else uses it, it's extremely useful to me, I'll frequently have several different projects/versions built locally when testing, it's nice to be able to just open up a built file rather than starting a temporary web server to check something for five minutes

@Gerrit0 Gerrit0 closed this as completed May 5, 2023
@ilg-ul
Copy link
Author

ilg-ul commented May 5, 2023

Did you add support for short URLs? Since I can't find details on how to configure it.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented May 5, 2023

No, it's being tracked as a part of #2111

@ilg-ul
Copy link
Author

ilg-ul commented May 5, 2023

Ok, I subscribed to #2111 to get updates when you address this issue.

@easyontop
Copy link

after typedoc use express to host it for * links and if it not found you can add a custom 404 page ig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about functionality
Projects
None yet
Development

No branches or pull requests

4 participants