Closed Cephra closed 5 months ago
Can't reproduce this issue. See generator meta tag https://adityatelange.github.io/hugo-PaperMod/
@adityatelange I've looked into the issue a bit more. It seems that the reason why the menu is rendering in the example site is this:
languages:
en:
# ...
menu:
main:
- name: Archive
url: archives
weight: 5
- name: Search
url: search/
weight: 10
- name: Tags
url: tags/
weight: 10
- name: WiKi
url: https://github.com/adityatelange/hugo-PaperMod/wiki/
I didn't put any translations in my toml and thus I'm relying on hugos internal menu generation.
Once I remove those translations in the exampleSite, I can reproduce the issue.
Now I wonder, is this actually an issue and if so, is it related to hugo or paperMod?
Maybe you can help!
Thanks,
Chris
Ah, I seem to have been wrong about how menus work in hugo. I've figured it out now!
If anyone else comes across this, it seems that it was working before because of a bug in hugo which was fixed in https://github.com/gohugoio/hugo/pull/12349/files & https://github.com/gohugoio/hugo/pull/12403/files
Cheers!
@Cephra I am facing the same issue. What's the underlying cause and the fix?
@Cephra I am facing the same issue. What's the underlying cause and the fix?
I've set menus = "main"
in the front matter and it works
I've set menus = "main" in the front matter and it works
In which file - hugo.yaml
?
I've set menus = "main" in the front matter and it works
In which file -
hugo.yaml
?
I use TOML in my project but in YAML it should be:
---
# ...your front matter stuff...
menus: main
---
As an alternative you could create a folder and put an _index.md
file in it with the content you want to have. That way, since it's in a folder, it'll create a menu entry for it. However I preferred to do it with setting menus
prop to main
.
Thanks.
However I preferred to do it with setting menus prop to main.
Can you elaborate on what this means?
Thanks.
However I preferred to do it with setting menus prop to main.
Can you elaborate on what this means?
Can you just give me the .md file that isn't showing up in the menu? I will fix it for you.
This is one of those that fail with
2.539 ERROR render of "term" failed: "/code/website/themes/PaperMod/layouts/_default/baseof.html:20:8": execute of template failed: template: _default/list.html:20:8: executing "_default/list.html" at <partialCached "header.html" . .Page>: error calling partialCached: "/code/website/themes/PaperMod/layouts/partials/header.html:127:38": execute of template failed: template: partials/header.html:127:38: executing "partials/header.html" at <site.GetPage>: error calling GetPage: page reference "Tech thoughts" is ambiguous
---
author: [admin]
date: "2015-02-01T21:30:15+00:00"
guid: http://ashishb.net/?page_id=2290
title: Tech thoughts
url: /tech-thoughts/
---
{{< catlist category="tech-thoughts" catlink=yes count=100 >}}
Starting with hugo version 0.125.0, the menus in my blog aren't rendered unless I explicitly add the menu to the .md file.
With my local hugo installation (hugo v0.123.7+extended), everything works as expected. The menu items are rendered.