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

Possible to check anchors? #52

Open
kamulos opened this issue Jan 19, 2021 · 3 comments
Open

Possible to check anchors? #52

kamulos opened this issue Jan 19, 2021 · 3 comments

Comments

@kamulos
Copy link

kamulos commented Jan 19, 2021

Is it possible to check anchors for links inside the mdbook? I want to link to specific sections in my book, but the anchor names just depend on the heading name. It would really give me peace of mind if this could be checked automatically.

@mhvelplund
Copy link

I wish this renderer did it, but in the meantime I've used https://github.com/untitaker/hyperlink

@eholk
Copy link

eholk commented Jun 8, 2023

A partial improvement would be for links like foo.md#my-section, just check that foo.md exists, without necessarily validating the anchor. Validating the anchor would be even better, but that's probably harder.

@dae
Copy link

dae commented Jun 8, 2023

@RumovZ patched in support for local anchor checking - you can find it here: https://github.com/ankitects/mdbook-linkcheck/commits/anchors

It required adding a dependency on mdbook to the linkcheck crate, so may be difficult to contribute back upstream.

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

4 participants