On get.gov, some of our in-page anchors we are manually removing special characters from urls when they appear in the corresponding header. Instead we should have our system auto-generate anchors without them containing special characters.
note: this was split from #241
Acceptance criteria
[ ] Modify our 11ty configuration so that the anchors that are generated don't have special characters
[ ] remove the manually set url links that handled special characters
Additional context
11ty uses a package called markdown-it to generate HTML from our Markdown formatted content. The anchors are generated by a markdown-it plugin called markdown-it-anchor. We can configure that plugin https://www.npmjs.com/package/markdown-it-anchor#user-friendly-urls but it isn't immediately obvious from the documentation which option gets us the "no percent encoding" setup that we are looking for. https://11ty.rocks/eleventyjs/slugs-anchors/ is a blog post with more details on how to configure these things.
Issue description
On get.gov, some of our in-page anchors we are manually removing special characters from urls when they appear in the corresponding header. Instead we should have our system auto-generate anchors without them containing special characters.
note: this was split from #241
Acceptance criteria
Additional context
11ty uses a package called
markdown-it
to generate HTML from our Markdown formatted content. The anchors are generated by a markdown-it plugin calledmarkdown-it-anchor
. We can configure that plugin https://www.npmjs.com/package/markdown-it-anchor#user-friendly-urls but it isn't immediately obvious from the documentation which option gets us the "no percent encoding" setup that we are looking for. https://11ty.rocks/eleventyjs/slugs-anchors/ is a blog post with more details on how to configure these things.slack thread for context
Links to other issues
split from #241
Related to #255