digitalcraftsman / hugo-material-docs

Port of Martin Donath's mkdocs-material theme to Hugo
MIT License
706 stars 186 forks source link

exampleSite broken on Hugo v0.32-0.34 #84

Open ilyasotkov opened 6 years ago

ilyasotkov commented 6 years ago

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.

ilyasotkov commented 6 years ago

The problem is not anyhow related to macOS, and appears only on Hugo v0.32 and higher.

0.31 and lower works just fine.

dbdevtop commented 6 years ago

Same errors on Win64 with Hugo v34.

29-01-_2018_08-12-30

moorereason commented 6 years ago

@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?

bep commented 6 years ago

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.

Hawker65 commented 6 years ago

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.

settermjd commented 6 years ago

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).

alexivkin commented 6 years ago

+1 please accept https://github.com/digitalcraftsman/hugo-material-docs/pull/92

awrog commented 6 years ago

I'd love to try and use this theme! Could you please make it work with Hugo 0.49? #92