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

Auto generate anchors without special characters #266

Open
2 tasks
abroddrick opened this issue Mar 18, 2024 · 2 comments
Open
2 tasks

Auto generate anchors without special characters #266

abroddrick opened this issue Mar 18, 2024 · 2 comments
Labels
dev For developers to work on

Comments

@abroddrick
Copy link
Contributor

abroddrick commented Mar 18, 2024

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

  • 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.

slack thread for context

Links to other issues

split from #241

Related to #255

@abroddrick
Copy link
Contributor Author

Sigh, @h-m-f-t sorry I made this in the wrong repo

@abroddrick abroddrick changed the title Auto generate anchors so Auto generate anchors without special characters Mar 18, 2024
@vickyszuchin vickyszuchin added the dev For developers to work on label Mar 18, 2024
@h-m-f-t h-m-f-t transferred this issue from cisagov/manage.get.gov Mar 19, 2024
@vickyszuchin
Copy link

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
Labels
dev For developers to work on
Projects
Status: 🎯 Ready
Development

No branches or pull requests

2 participants