zola
zola copied to clipboard
Internal anchors can be added by templates
Zola version: 0.18.0
Because templates can add extra anchors, the internal link checker has false negatives when linking directly to these anchors. There are a few options to getting around this, namely:
- Make the internal link checker fully render a template and use the external link checker code if there's an error, to verify that it's not added by a template. This could potentially be disabled by default because it's slow.
- Add options to disable the link checker for particular internal pages (e.g., allow any anchor on
@/page.md
when linking). - Add the ability to tell zola about custom anchors in front matter, and/or the global configuration for anchors added to every page (like a return-to-top anchor).
Note that any combination of these could be implemented, but I don't want to be too prescriptive about the solution since there are multiple and it depends on what people would be comfortable with.
See https://github.com/getzola/zola/pull/2264
We are not going to check anchors added by templates