I have an idea for something a little, unusual, where I’d generate HTML and once it’s generated, I’d parse it and inject styles and javascript based on the classes, tags etc that are found.
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.
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.