Can I keep `postcss.config.js` in my theme directory?

I’m developing a theme for Hugo. In that, I’m wondering if I can move postcss.config.js from the project root to theme root folder. My motive is to abstract things for the user.
Since Hugo already kind of merges the theme and project folders while building, would some-site/themes/some-theme/postcss.config.js be read by Hugo while building some-site?
I know I can manually specify the config path using PostCSS’s config parameter. I’m just asking to get clarity so that I don’t unnecessarily write a line of code.


Your timing is …


So, in Hugo 0.75 the answer to your question is YES. Before that it was a big maybe.

1 Like

I’m so glad I started my web development journey with Hugo. I’m always amazed by the pace it’s getting developed, and by the fact that every new release has something useful for me in!
To all the developers, thanks for this great software from the bottom of my heart.

Sadly, I can’t move to Hugo v0.75 due to some bugs with libsass and Foundation, but I’m really fired up.

1 Like