1.0 KiB
1.0 KiB
+++ author = "Hugo Authors" title = "Advanced Style" date = "2024-04-09" description = "Guide to advanced usage of Anubis2" tags = [ "emoji", ] +++
The custom
.css
.scss
.sass
file should be placed in assets/
folder. (instead of static/
)
This page is affected by assets/css/custom1.scss
and assets/css/custom2.css
How to use PoseCSS
First, make sure your Hugo version supports Hugo Pipes. Hugo Pipes is available in Hugo 0.46
and later versions.
Then, add the following content to your Hugo configuration file (such as config.toml) to enable PostCSS:
[build]
writeStats = true
[params]
usePostCSS = true
In addition, you need to create a postcss.config.js file in the root directory of your project, with the following content:
module.exports = {
plugins: [
require('postcss-import')(),
require('postcss-url')(),
require('autoprefixer')(),
// Add more PostCSS plugins here if needed
]
};