Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify node package installation for Hugo guide #1000

Merged
merged 1 commit into from
Dec 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/guides/hugo.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,21 @@ This tells Hugo to write a `hugo_stats.json` file to the project root as part of

## Node Packages

Run this to install the necessary packages:
If the `package.json` file at the project root doesn't exist yet (which tracks all your node dependancies), run this command from your project root directory to create it:

```
npm install postcss postcss-cli @fullhuman/postcss-purgecss
npm init
```

If the `package.json` file at the project root doesn't exist yet, this will create it.
You can enter as much or little information as you want. When the file is created, you can continue to install the packages.

Run this from your project root to install the necessary packages:

```
npm install postcss postcss-cli @fullhuman/postcss-purgecss --save
```

The packages will install into a folder called `node_modules` and also be added to your `package.json` file.

If it's not already there, add `node_modules/` to your `.gitignore` file.

Expand Down