generated from cloud-gov/pages-uswds-11ty
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Auto generate anchors without special characters #266
Labels
dev
For developers to work on
Comments
Sigh, @h-m-f-t sorry I made this in the wrong repo |
abroddrick
changed the title
Auto generate anchors so
Auto generate anchors without special characters
Mar 18, 2024
Accepted into the backlog. Suggested timeline: 2 sprints away (from sprint 41). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: