The sidebar menu uses menu data defined in the site's data folder. Currently, it does not support any language-specific data, limiting its usefulness in multi-language sites.
To reproduce
Steps to reproduce the behavior:
Create a new Hinode site using the template
Add input from the Hinode example site (which contains, en, fr, and nl pages)
Configure a sidebar menu in data/blog.yml with entries for the first three blogs
Observe the link errors such as Cannot find page: /fr/blog/first-post
Expected behavior
Hinode should use a language-specific data file if available, and use a data file without any language extensions as fallback. By convention, the data files should include the language code as extension. For example, the French translation of the blog sidebar would have the path data/blog.fr.yml when using the YAML format.
Host environment
Please complete the following information where applicable.
I've tested on v0.24.6 my draft 3-lang document site. It's ok with sidebar now. Thank you!
I had to use FM slugs to make hugo find pages from docs..yml titles.
Maybe using a construction with links would be more appropriate, but I couldn’t get it to parse local links of this kind
Describe the bug
The sidebar menu uses menu data defined in the site's data folder. Currently, it does not support any language-specific data, limiting its usefulness in multi-language sites.
To reproduce
Steps to reproduce the behavior:
en
,fr
, andnl
pages)data/blog.yml
with entries for the first three blogsCannot find page: /fr/blog/first-post
Expected behavior
Hinode should use a language-specific data file if available, and use a data file without any language extensions as fallback. By convention, the data files should include the language code as extension. For example, the French translation of the blog sidebar would have the path
data/blog.fr.yml
when using theYAML
format.Host environment
Please complete the following information where applicable.
Hugo environment
Copy the output of
hugo env
ornpm run env
here.Additional context
Raised in #991.