dev_guide
dev_guide copied to clipboard
Always use explicit anchors
In reviewing the Spanish translation I've found this instance of a section without explicit anchor. An earlier section links to this one using the implicit anchor created by rmarkdown/quarto, but the link broke in the Spanish version because the name of the implicit anchor is now different.
https://github.com/ropensci/dev_guide/blob/6bee2f778e219a533a91887167c2ac13bdaed592/softwarereview_intro.Rmd#L52
Before sending a PR to address this particular case, perhaps it might be better to do a holistic revision to add explicit anchors to every section in one single PR.
Even better would be a workflow file that ensured that every section and sub-section had an explicit anchor. That could be integrated as part of the general PR workflow. @maelle How about i write a script for that, let you know when that's done, and you can plug it in to the workflow?
Oh good catch @eliocamp!
@mpadge Yep but first I'll make a bigger PR ensuring current content has such explicit references.
For my own reference: https://quarto.org/docs/authoring/cross-references.html#sections
I've done some work on this, right now I have one (last?) blocker which is that titles à la Ajustar la fecha límite de la revisión {.unnumbered} {#tweak-review-due-date}
don't work, even if I change the order of the curly braces thingies. The second one is rendered as is, not used.
https://community.rstudio.com/t/quarto-how-to-cross-reference-unnumbered-book-chapter/136279
this is only a problem for the bot cheatsheet. Maybe we don't need explicit cross-references for it, or maybe it wouldn't be horrible to have numbers there.
- Add explicit anchors
- Check existing internal links
- PR workflow
@mpadge note that I need to be working on a PR workflow anyway. For each PR,
- if change in a doc in a language,
- transform to XML and translate the same node in the other languages.
this works if all languages have the same XML structure (header, paragraphs) -- which this work on anchors helped check.