From 375d75c0134b196d8669b90d690ee12572068697 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 13 Dec 2022 17:24:47 -0800 Subject: [PATCH] Update postcss npm instructions (#1931) --- content/en/hugo-pipes/postcss.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/content/en/hugo-pipes/postcss.md b/content/en/hugo-pipes/postcss.md index b87dc4595..8c55b7877 100755 --- a/content/en/hugo-pipes/postcss.md +++ b/content/en/hugo-pipes/postcss.md @@ -1,8 +1,6 @@ --- title: PostCSS description: Hugo Pipes can process CSS files with PostCSS. -date: 2018-07-14 -publishdate: 2018-07-14 categories: [asset management] keywords: [] menu: @@ -10,7 +8,6 @@ menu: parent: "pipes" weight: 40 weight: 40 -sections_weight: 40 --- Any asset file can be processed using `resources.PostCSS` which takes for argument the resource object and a slice of options listed below. @@ -22,11 +19,11 @@ The resource will be processed using the project's or theme's own `postcss.confi {{ $style := $css | resources.PostCSS }} ``` -{{% note %}} -Hugo Pipe's PostCSS requires the `postcss-cli` JavaScript package to be installed in the environment (`npm install -g postcss postcss-cli`) along with any PostCSS plugin(s) used (e.g., `npm install -g autoprefixer`). +You must install the required Node.js packages to use the PostCSS feature. For example, to use the `autoprefixer` package, run these commands from the root of your project: -If you are using the Hugo Snap package, PostCSS and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install postcss-cli` without the `-g` flag. -{{% /note %}} +```text +npm install -D postcss postcss-cli autoprefixer +``` ### Options