I have a Hugo site with a custom theme for a simple blog.
Some posts require KaTeX (js + css) to display math equations, but I would like this code not to be loaded on all pages, only those posts which have a certain key-value pair in the frontmatter (e.g. katex: true).