mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 08:59:43 -04:00
content: Fix formatting
This commit is contained in:
parent
82885415fa
commit
d77b06aa6c
@ -27,14 +27,14 @@ Step 1
|
||||
Step 2
|
||||
: Install the required Node.js packages in the root of your project:
|
||||
|
||||
```sh
|
||||
```sh {copy=true}
|
||||
npm i -D postcss postcss-cli autoprefixer @fullhuman/postcss-purgecss
|
||||
```
|
||||
|
||||
Step 3
|
||||
: Enable creation of the `hugo_stats.json` file when building the site. If you are only using this for the production build, consider placing it below [`config/production`].
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
{{< code-toggle file=hugo copy=true >}}
|
||||
[build.buildStats]
|
||||
enable = true
|
||||
{{< /code-toggle >}}
|
||||
@ -79,7 +79,7 @@ Step 5
|
||||
Step 6
|
||||
: If the current environment is not `development`, process the resource with PostCSS:
|
||||
|
||||
```go-html-template
|
||||
```go-html-template {copy=true}
|
||||
{{ with resources.Get "css/main.css" }}
|
||||
{{ if hugo.IsDevelopment }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
@ -124,7 +124,7 @@ let tailwindConfig = process.env.HUGO_FILE_TAILWIND_CONFIG_JS || './tailwind.con
|
||||
|
||||
## Limitations
|
||||
|
||||
Do not use `resources.PostProcess` when running Hugo's built-in development server. The examples above specifically prevent this by verifying that the current environment is not "development".
|
||||
Do not use `resources.PostProcess` when running Hugo's built-in development server. The examples above specifically prevent this by verifying that the current environment is not `development`.
|
||||
|
||||
The `resources.PostProcess` function only works within templates that produce HTML files.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user