hugo-material-docs
hugo-material-docs copied to clipboard
exampleSite broken on Hugo v0.32-0.34
I did everything according to the "Getting started" guide, then replaced config.toml and the content directory with the ones from exampleSite.
Only the home page works. Going to http://localhost:1313/getting-started/ gives the 404 page not found.
$ hugo version
Hugo Static Site Generator v0.34 darwin/amd64 BuildDate:
$ hugo server
Building sites … ERROR 2018/01/24 08:57:21 error processing shortcode "_internal/shortcodes/relref.html" for page "index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "getting-started/index.md".
ERROR 2018/01/24 08:57:21 error processing shortcode "_internal/shortcodes/relref.html" for page "index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "getting-started/index.md".
ERROR 2018/01/24 08:57:21 error processing shortcode "_internal/shortcodes/relref.html" for page "index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "getting-started/index.md".
ERROR 2018/01/24 08:57:21 error processing shortcode "_internal/shortcodes/relref.html" for page "index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "getting-started/index.md".
...
Press Ctrl+C to stop
This is on macOS 10.12.6.
The problem is not anyhow related to macOS, and appears only on Hugo v0.32 and higher.
0.31 and lower works just fine.
Same errors on Win64 with Hugo v34.

@bep,
It appears that content/index.md is gobbling up all regular pages (the "page" partition cache contains one item: index.md) so that shortcodes like {{< ref "getting-started/index.md" >}} no longer work. Delete content/index.md, and the ref calls work (and the cache contains all md files).
Is this by design?
Is this by design?
Yes. Rename the home page content file to "_index.md" and this should work. You may have to add layout = single or something.
I have a similar issue :
If I copy the get-started to my test site, it works fine, but if I modify the content, it just 404.
I'm on Hugo 0.34.
Thanks for the suggestion/solution @bep. I only had to rename the home page content file to "_index.md" and that sorted out the issue for me (I'm using v0.37 darwin/amd64).
+1 please accept https://github.com/digitalcraftsman/hugo-material-docs/pull/92
I'd love to try and use this theme! Could you please make it work with Hugo 0.49? #92