I am writing a custom PostCSS plugin to operate on HTML files in the publicDir. Is there a way I can get the path of the publicDir within the plugin JS source?
For example, currently I have to do hugo server -d public and then hardcode the path in my plugin to “public”. I was just wondering if there is a way to get rid of this hardcoded value.
Thanks. Having access to this variable would be a huge step forward for me, and I hope for others as well. The use case I’m hoping for is the inclusion of post-build tasks through PostCSS plugins and {{ ... | postCSS | resources.PostProcess }}.
I have one doubt though. Would this work when hugo serves from memory?