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

Manual links are unstable #2368

Closed
tomodachi94 opened this issue Sep 14, 2024 · 5 comments
Closed

Manual links are unstable #2368

tomodachi94 opened this issue Sep 14, 2024 · 5 comments

Comments

@tomodachi94
Copy link
Contributor

Hello!

Unfortunately, links to the manual are unstable and sometimes change.

For example, before #1316, https://just.systems/man/en/chapter_18.html was a link to the section called "Other Editors", but it now links to "Micro". This happened in quotidian-ennui/quotidian-ennui.github.io#11, for example.

Thank you for this awesome project ❤️

@casey
Copy link
Owner

casey commented Sep 15, 2024

Ahh, that's annoying. I'm not sure it can be fixed though, since the docs are generated by mdbook, which uses chapter numbers instead of names in URLs. One thing you might try is linking directly to the readme. It has the same content, but the fragment links are based on the heading, and so should be more stable. For example:

https://github.com/casey/just?tab=readme-ov-file#other-editors

@casey casey closed this as completed Sep 15, 2024
@laniakea64
Copy link
Contributor

I'm not sure it can be fixed though, since the docs are generated by mdbook, which uses chapter numbers instead of names in URLs.

But other sites generated with mdbook don't have this issue, e.g. https://rust-lang.github.io/mdBook/ and https://gtk-rs.org/gtk4-rs/stable/latest/book/
How are they solving it?

Could this issue with just.systems actually stemming from code in https://github.com/casey/just/tree/master/crates/generate-book ?

@casey
Copy link
Owner

casey commented Sep 16, 2024

Whoops, you're totally right! Let me see if I can fix that.

@casey casey reopened this Sep 16, 2024
@tomodachi94
Copy link
Contributor Author

Maybe it could be as simple as replacing calls to number with calls to slug?

fn slug(s: &str) -> String {

@casey
Copy link
Owner

casey commented Sep 17, 2024

Fixed in #2372! I can't probably that they'll be permanently stable, since chapter titles can still change, but they should be much more stable.

@casey casey closed this as completed Sep 17, 2024
tomodachi94 added a commit to tomodachi94/nixpkgs that referenced this issue Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants