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

Duplicated anchors for h2 sections #2737

Open
froggleston opened this issue Jul 29, 2024 · 2 comments
Open

Duplicated anchors for h2 sections #2737

froggleston opened this issue Jul 29, 2024 · 2 comments

Comments

@froggleston
Copy link

Following updating from 2.0.9 to 2.1.0, we see duplicated anchor tags following h2 sections:
image

We create anchors manually before the HTML is passed to pkgdown as we need to provide translated anchors:
image

Would it be possible to add some kind of flag to tweak_anchors to tell pkgdown to ignore <section> objects? Or is there another way I can avoid the automated adding of anchors to sections?

@hadley
Copy link
Member

hadley commented Jul 29, 2024

If you want to provide translated anchors, maybe that's something pkgdown should just do for you? It looks like you're only translating the word "anchor"?

@froggleston
Copy link
Author

Hi @hadley thanks for your quick reply! No, we have a larger set of "core" translations that we apply to our lesson materials based on a configured two-letter language code: https://github.com/carpentries/sandpaper/blob/main/R/utils-translate.R

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

No branches or pull requests

2 participants