Skip to content

Commit

Permalink
docs: Update Hugo docs (#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
schnerring committed Mar 29, 2024
1 parent f086de5 commit b8d3131
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions docs/guides/hugo.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,35 @@ In your `config.toml` file, add this:

```toml
[build]
writeStats = true
[build.buildStats]
enable = true
```

Or, If using a `config.yaml` file, add this:

```yaml
build:
writeStats: true
buildStats:
enable: true
```

This tells Hugo to write a `hugo_stats.json` file to the project root as part of the build. It includes all tags, classes, and ids from your `*.html` templates.

You should also add `hugo_stats.json` to Hugo's server watcher:

```toml
[module]
[module.hugoVersion]
extended = false
min = "0.115.0"
[[module.mounts]]
source = "assets"
target = "assets"
[[module.mounts]]
source = "hugo_stats.json"
target = "assets/watching/hugo_stats.json"
```

## Node 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:
Expand Down

0 comments on commit b8d3131

Please sign in to comment.