How to add page tags dynamically during site generation? More precisely, I know I can add tags to any page and how taxonomies work, i.e. can generate list of pages with the term, etc.
But case in point, I would like to have a bibliography-like feature across the entire (sections of a) site. They should be implemented by a shortcode, which best looks up the “term” in its own taxonomy for generating proper link (onto the page), but also holds other information. At the same time, I would like this page to become associated with the bibliography item, i.e. tag it.
Is it possible - during the site generation - to add tags (or custom taxonomy terms) to a page from a shortcode?
Notably, I am aware there is .Page.Data.Terms
object I can access from a partial that a shortcode calls, but I do not think it is going to be useful in the sense above. I also know of the .Store
(.Scratch
) where I can set anything, but that then won’t make use of the taxonomies, so a regular template cannot e.g. list all pages with such “dynamically” added terms.
Basically I wonder how to best go about the problem described above as such, but taxonomy terms sounded like a good way to implement bibliography site-wide. Thanks for any ideas.