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

Links on second level toc items aren't working #15

Closed
JanoschDeurer opened this issue Sep 1, 2020 · 5 comments
Closed

Links on second level toc items aren't working #15

JanoschDeurer opened this issue Sep 1, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@JanoschDeurer
Copy link

I'm using material for mkdocs. There are two different behaviors. If I don't set a first level heading for a page, mkdocs automatically renders the one that is given by the nav entry in the config file. In this case mkdocs-with-pdf throws the following error:

ERROR   -  Content discarded: target points to undefined anchor "('string', '#')"

The entry in the toc then points to #.

If I set the heading on the page manually by adding

# exampleHeading

to my markdown file I get the following error instead:

ERROR   -  No anchor #example/path/:exampleheading for internal URI reference

The resulting toc entry is then no longer a link meaning it is not clickable.

@JanoschDeurer
Copy link
Author

After looking at this a bit closer there seems to be a general problem with all links towards level two headings.

@orzih orzih added the bug Something isn't working label Sep 5, 2020
@orzih
Copy link
Owner

orzih commented Sep 5, 2020

Thank you for your report.

I added the id to first top level heading where it was missing.
Please check it.

@MalkmusT
Copy link

MalkmusT commented Sep 8, 2020

Most of our links for second level toc entries are working now.
We are still facing some failling links due to encoding issues, which is part of a separate Issue.

@orzih
Copy link
Owner

orzih commented Sep 10, 2020

Thank you for the confirmation work.

We are still facing some failling links due to encoding issues, which is part of a separate Issue.

Could you provide a "mkdocs project" that this problem occurs?

@JanoschDeurer
Copy link
Author

I dug a little deeper and the remaining problem is indeed with the encoding of special characters. I'm gonna open another ticket with a minimal project setup to repoduce and close this one :) Thansk for fixing this so fast :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants