Skip to content

docs: add missing PostCSS install steps to "start from scratch" guide - #2612

Closed
anishesg wants to merge 2 commits into
docsy:mainfrom
proudhare:fix/ph-issue-1718
Closed

anishesg wants to merge 2 commits into
docsy:mainfrom
proudhare:fix/ph-issue-1718

Conversation

@anishesg

Copy link
Copy Markdown

The "Start a site from scratch" Hugo-module guide in
docsy.dev/content/en/docs/get-started/docsy-as-module/start-from-scratch.md
was missing the PostCSS installation step and postcss.config.js creation,
causing users to hit a Cannot find module autoprefixer error when running
hugo server on a freshly created site.

The TL;DR command blocks (both Unix and Windows) now include
npm install -D autoprefixer postcss-cli postcss and the creation of
postcss.config.js with the autoprefixer plugin configuration. A new
"Install PostCSS" subsection was also added to the Detailed Setup instructions
with the same commands and a cross-reference to the
installation prerequisites page.

Fixes #1718

@chalin chalin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anishesg.
@deining - thoughts?

@anishesg

Copy link
Copy Markdown
Author

Fixed the prettier CI failure — the postcss.config.js snippet had 4-space indentation instead of 2 and was missing the trailing semicolon/comma. Ran npx prettier --write to bring it in line.

@chalin

chalin commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution. This was a correct fix against the docs as they stood when #1718 was filed, but it's been superseded: since Docsy 0.16.0, PostCSS is opt-in -- Docsy only runs it for RTL languages or when the site provides a project-root postcss.config.{js,mjs,cjs} file (see PostCSS is opt-in for non-RTL sites). A from-scratch site no longer needs PostCSS at all, and creating postcss.config.js as part of setup would now re-enable PostCSS processing for sites that don't need it.

For sites that do want PostCSS, the setup steps live in Installation prerequisites § Install PostCSS (optional). The start-from-scratch guide has also since been rewritten for the 0.17.0 Dart Sass flow, so this branch no longer applies cleanly.

Closing as superseded, alongside #1718. Thanks again.

@chalin chalin closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hugo-module "Setup a site from scratch" instructions are missing steps

2 participants