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

rustdoc: Optionally generate foo/index.html with foo/ links, instead of foo.html #19600

Closed
SimonSapin opened this issue Dec 6, 2014 · 9 comments
Labels
T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

Currently, rustdoc generates HTML links like <a href="../std/index.html"> (this is from the crate index side bar.) When docs are served over HTTP(S), with most servers, <a href="../std/"> works just as well and looks nicer. However this doesn’t work when when locally-generated docs are viewed with file://… URLs.

There should be an off-by-default option in rustdoc to generate the shorter links instead.

Edit: while we’re at it, every foo.html page should also be foo/index.html instead, so that short links are not just for pages that are already something/index.html.

@steveklabnik
Copy link
Member

Is there a good reason to not include the index.html other than aesthetics?

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 6, 2014
@SimonSapin
Copy link
Contributor Author

No, this is purely aesthetics.

There is precedent in Sphinx’s dirhtml builder, which goes even further than I remembered and generates every page as foo/index.html (with short foo/ links) instead of foo.html.

@SimonSapin
Copy link
Contributor Author

An example of Sphinx docs that use dirhtml: http://weasyprint.org/docs/

@SimonSapin SimonSapin changed the title rustdoc: option to link to foo/ instead of foo/index.html rustdoc: Optionally generate foo/index.html with foo/ links, instead of foo.html Dec 6, 2014
@steveklabnik
Copy link
Member

Triage: no change

@steveklabnik
Copy link
Member

Triage: no change.

@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@Mark-Simulacrum
Copy link
Member

Closing in favor of #16103.

@SimonSapin
Copy link
Contributor Author

SimonSapin commented Jul 22, 2017

That is not the same (having a top-level index at all vs generating shorter links to existing indices), but I’m not really attached to this anymore so ¯\_(ツ)_/¯

@Mark-Simulacrum
Copy link
Member

Yeah, I'm also not a fan of breaking file:// viewing. Will keep closed unless someone requests otherwise.

@SimonSapin
Copy link
Contributor Author

Yes, the suggestion was an off-by-default option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants