Hugo-module "Setup a site from scratch" instructions are missing steps
And to create postcss.config.js as per step 3 of https://gohugo.io/hugo-pipes/postcss/
module.exports = {
plugins: [
require('autoprefixer')
]
};
If you don't want error:
Error: error building site: POSTCSS: failed to transform "/scss/main.css" (text/css): Error: Loading PostCSS Plugin failed: Cannot find module 'autoprefixer'
Put together a fix in https://github.com/google/docsy/pull/2612.
As of Docsy 0.16.0, PostCSS is opt-in: Docsy only runs PostCSS for RTL languages or when your site provides a project-root postcss.config.{js,mjs,cjs} file (see PostCSS is opt-in for non-RTL sites in the 0.16.0 release notes). A site created via the start-from-scratch guide no longer needs PostCSS or autoprefixer, so the Cannot find module 'autoprefixer' error reported here can no longer occur on a default setup.
For sites that do want PostCSS processing, the setup steps live in Installation prerequisites § Install PostCSS (optional).
Closing as resolved by the 0.16.0 changes (confirmed in 0.17.0). This also supersedes #2612, which would reintroduce PostCSS as a required step.