Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilingual Menu #19

Open
jmzagorski opened this issue Mar 10, 2021 · 2 comments
Open

Multilingual Menu #19

jmzagorski opened this issue Mar 10, 2021 · 2 comments

Comments

@jmzagorski
Copy link

I was wondering if it was in the scope of this project to change the menu for multi-lingual sites? Currently the index.html template has:

set index = get_section(path="_index.md")

Is it possible to set the index with this logic:

{% if lang == config.default_language %}{% set index = "_index.md" %}{% else %}{% set indx= "_index." ~ lang ~ ".md" %}{% endif %}

My team is pretty new to zola, so if we are overlooking something with this logic or your implementation please let me know. Right now we override the menu block with this logic. However, we may have a few documentation sites that will need to implement this override. Thanks for a great theme!

@Keats
Copy link
Collaborator

Keats commented Mar 11, 2021

The next Zola version will have better handling for languages and you should be able to just do get_section(path="_index.md", lang=lang) (hopefully)

@jmzagorski
Copy link
Author

Great news! Thank you for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants