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

Avoid Duplicated IDs in a page #79

Merged
merged 4 commits into from
Mar 24, 2019
Merged

Avoid Duplicated IDs in a page #79

merged 4 commits into from
Mar 24, 2019

Conversation

toshimaru
Copy link
Owner

@toshimaru toshimaru commented Mar 24, 2019

Issue

According to W3C HTML Validator, it says:

image

related issue: #73

Resolution

  • Remove id attribution from anchors

Others

  • Add minitest-reporters

@toshimaru toshimaru self-assigned this Mar 24, 2019
@toshimaru toshimaru merged commit c52b83b into master Mar 24, 2019
@toshimaru toshimaru deleted the avoid-duplicated-ids branch March 24, 2019 04:29
@hasalex
Copy link

hasalex commented Apr 25, 2019

After this commit ids are not generate, and the links in toc doesn't work anymore.
Should I add the ids by myself ? Or is there a new configuration ?

@toshimaru
Copy link
Owner Author

No. This PR just resolved the id duplication. Although the ids in each anchor are removed, the ids in each heading keep remaining.

If you find any issue I'm missing, creating an
issue are welcomed.

@jp26jp
Copy link

jp26jp commented Dec 27, 2019

@toshimaru my headers are written with HTML and my markdown processor is kramdown so IDs aren't getting generated. It might be worth providing the option to add the id to the anchor tag in these instances.

Or, if possible, you could check that the header has an ID and then generate one in the anchor if it does not.

N7K4 pushed a commit to n13org/jekyll-toc-navtotop that referenced this pull request Feb 29, 2020
* Organize test directory

* Avoid duplicated id in a page

* Add minitest-reporters

* Fix failed tests
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

Successfully merging this pull request may close these issues.

3 participants