Skip to content
Will Holmes edited this page Jul 10, 2023 · 3 revisions

There are a few Node dependencies for this project but they are completely optional to use in development. This is by design so you don't have to use npm if you don't want to. You can find them within the theme's package.json file.

  • postcss/postcss-cli - Required for PostCSS processing with Hugo. Set enable_postcss to true in your params.toml to enable PostCSS. If you don't have postcss-cli installed in development, make sure to set enable_postcss to false or you'll get an error.
  • autoprefixer - Part of the PostCSS setup in postcss.config.js.

It is recommended to install these dependencies locally in development with npm. For production, Netlify will automatically install dependencies for you if you have a package.json at the root of your repo.

First, copy the theme's package.json file to the root of your project. Make sure you have npm installed and are using the current LTS version. You can install/use nvm to manage your version (e.g. nvm use 18).

Then simply npm install from your project's root directory. A package-lock.json will be generated for you which you can commit to source control.

These available npm scripts all are defined in package.json if you need to reference or customize them at any time.

Clone this wiki locally