Test Site for diagnosing the issue in google/docsy#1874
-
mkdir docsy-debug-1874&cd docsy-debug-1874/ -
git clone https://github.com/ouhft/docsy-debug-1874.git ./docsy-debug-1874-repo&cd docsy-debug-1874-repo/- Create
.gitignoreand populate with minimal content
- Create
-
hugo new site docsCongratulations! Your new Hugo site was created in /Users/carl/Projects/github/ouhft/docsy-debug-1874/docsy-debug-1874-repo/docs.
-
cd docs -
hugo mod init github.com/ouhft/docsy-debug-1874 -
hugo mod get github.com/google/docsy@1929a65ccffb316006de9c0daaee631a7d8fc225 -
mkdir -p content/en -
Rename
hugo.tomltohugo.yaml, then edit content to what is shown in current commit -
Run
hugo --cleanDestinationDir --gc --templateMetrics --logLevel debugand store output into/build.txt
... initial commit time. Build successful
- Modify hugo.yaml to add module config
- Run
hugo --cleanDestinationDir --gc --templateMetrics --logLevel debugand store output into/build.txt
... second commit. Build failed
- Add
package.jsonto/docs - Run
npm install - Run
hugo --cleanDestinationDir --gc --templateMetrics --logLevel debugand store output into/build.txt
... third commit. Build successful
- Add
content/en/_index.md - Run
hugo --cleanDestinationDir --gc --templateMetrics --logLevel debugand store output into/build.txt
Error has returned:
Error: error building site: render: failed to render pages: render of "taxonomy" failed: "/Users/carl/.local/share/hugo/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.9.2-0.20240315194958-1929a65ccffb/layouts/docs/list.html:12:5": execute of template failed: template: docs/list.html:12:5: executing "main" – File is nil; wrap it in if or with: {{ with partial "section-index.html" .>: error calling partial: "/Users/carl/.local/share/hugo/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.9.2-0.20240315194958-1929a65ccffb/layouts/partials/section-index.html:8:69": execute of template failed: template: partials/section-index.html:8:69: executing "partials/section-index.html" at <.File }}{{ .UniqueID }}{{ end }}
... fourth commit. Build failed
- Edit
_index.md, remove thecascadefrontmatter. - Run
hugo --cleanDestinationDir --gc --templateMetrics --logLevel debugand store output into/build.txt
This one fails on a more basic issue: ERROR [en] REF_NOT_FOUND: Ref "/getting-started/migration.md": "/Users/carl/Projects/github/ouhft/docsy-debug-1874/docsy-debug-1874-repo/docs/content/en/_index.md:16:77": page not found
... fifth commit. Build failed
- Edit
_index.mdto remove obvious issues with missing links. Addtype: docsto frontmatter - Run
hugo --cleanDestinationDir --gc --templateMetrics --logLevel debugand store output into/build.txt
Also, hugo server tested to see the output. With the exception that the readfile shortcode isn't producing output (but if the path is changed, will produce an error!), the rest looks about right.
... sixth commit. Build successful
- Edit
_index.md, and put thecascadefrontmatter back in - Run
hugo --cleanDestinationDir --gc --templateMetrics --logLevel debugand store output into/build.txt
The taxonomy error returns. Looks like the cascade frontmatter is the trigger condition here.
... seventh commit. Build failed