gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.78k stars 7.53k forks source link

Unable to specify multiple plugins in the PostCSS options map #9015

Closed jmooring closed 3 years ago

jmooring commented 3 years ago

Our PostCSS options documentation states:

use [string] List of PostCSS plugins to use

Currently you can only specify a single plugin:

For example, neither of these work:

{{ $css := resources.Get "css/main.css" | postCSS (dict "use" (slice "autoprefixer" "postcss-color-alpha")) }}
{{ $css := resources.Get "css/main.css" | postCSS (dict "use" "autoprefixer postcss-color-alpha") }}

You can work around this by (a) creating a postcss configuration file, or (b) creating a postcss object within the project's package.json file.

But for simple setups, with just a few plugins using default plugin options, specifying the plugins inline is simpler.

Ref: https://discourse.gohugo.io/t/how-to-list-postcss-plugins-to-use/31293

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.