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

Convert all the links in the generated print.html for linking inside the book into URL fragment form #1736

Open
HollowMan6 opened this issue Jan 30, 2022 · 1 comment · May be fixed by #1738
Labels
A-Print Area: The "printed" page

Comments

@HollowMan6
Copy link

I'm requesting for a feature that convert all the links in the generated print.html that link to another html page inside the "book" into the URL fragment form, so that once a user click that link, they will be guided to the corresponding spot instead of another html page (This should be obvious as print.html includes all the generated book content, the current behavior is some kind of weird).

For one example of the mdBook Documentation (Notice URL change):

  • Current Behavior:
    image

image

  • Expected Behavior:
    image

image

For use case: #88 (comment)

@HollowMan6 HollowMan6 changed the title Convert all the links in the generated print.html inside the book into URL fragment form Convert all the links in the generated print.html for linking inside the book into URL fragment form Jan 30, 2022
@ehuss ehuss added the A-Print Area: The "printed" page label Jan 30, 2022
@HollowMan6
Copy link
Author

Well, I just noticed that developers have already noticed this issue: https://github.com/rust-lang/mdBook/blob/v0.4.15/src/utils/mod.rs#L73-L74 , it may be quite difficult, but still I hope someone can resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Print Area: The "printed" page
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants