I read Why are anchor links not available to pages?.
I know it’s again Section vs Page.
I still would like to express the need for this feature (doc) at the template level. When making a generic theme aiming to be used by someone else, I feel like it’s more appropriate to tell
set
template = "example.html"
in your front matter, the template will take care of your content
than
set
insert_anchor_links = "heading"
in your front matter, but only for sections that useexample.html
template, andinsert_anchor_links = "right"
for others that use thepage.html
default for their pages
It’s the same kind of thing as having the user insert [TOC]
at the position where he wants the table of content to be inserted, while a macro called by the template takes care of this.
I feel like these things belong more to templating than content metadata, and so the current way of specifying this makes writing content-independent theme cumbersome.
In concrete terms, it could mean to have an insert_anchor_links
filter, but that’s maybe a too big task for a filter.