11ty / eleventy-base-blog

A starter repository for a blog web site using the Eleventy static site generator.
https://eleventy-base-blog.netlify.app/
MIT License
1.21k stars 619 forks source link

Fix usage of `level` in the options object for `markdown-it-anchor` #106

Closed siimpragi closed 2 years ago

siimpragi commented 3 years ago

I noticed that the level option is misplaced. It should be passed with the opts object for markdown-it-anchor.

Since this option is misplaced, its default value (1) is used. Meaning, anchors are applied to headings of all levels. According to the code only headings with levels [1,2,3,4] should get anchors. Please let me know if this is the correct behavior.

Before After
before after
talmax1124 commented 2 years ago

I don't know if you have the time, but can you help me do a pull request to my repo for the tags feature. I have tried making it work and it isn't working.

My repo: https://github.com/talmax1124/knighttimesnews-restore/

zachleat commented 2 years ago

Thank you!