To do this in Hugo, it looks like pipes would be the way to do this, but it would require running on the final HTML output and altering it which it doesn’t look like it’s supported. Is my understanding correct or does anyone have any examples of how I could do this?
Sidenote: I’m not sure that this is a good idea, more of a fun thought experiment.
Thanks for any ideas / input,
I think you need to ask a more specific question first. But at a high level it sounds like you could do this via replace and replaceRE functions in your templates.
Thanks for the response.
What I had in my head was hugo outputs a page along the lines of:
I would like the opportunity once this page has been rendered to parse the HTML to extract:
Tags: html, head, title, body, div
<link rel="stylesheet" href="/css/html/body.css">
<script async defer src="/js/my-element.js"></script>
I don’t think I could do this inside the template since it would require changing HTML outside of the template.
This could be done with