Some of my articles are written in different languages.
Is there a way to make the home button go to the homepage of the same language?
i.e. If I were reading a French article with the URL $base/fr/article, clicking on the home button would get me back to $base/fr instead of $base.
Currently, the home button reads the config file for entry config.extra.logo_home_link.
I added the following to my config.toml, but it didn’t work.
[languages.fr.extra]
logo_home_link = "$base/fr"
I also thought about adding an index.fr.html in templates/ but it doesn’t seem to be the most modular option, nor do I know if it would work.
Thanks a lot for the zola project, have a nice day
I’m not sure how to do that. I can’t really wrap my head around the macro language Zola uses, and I can only find short codes in the documentation. Are they the same thing?
I don’t really know how to adapt your solution to my case, since I don’t understand the macros.
I tried to do that, but it seems like my website doesn’t follow the template when it’s in another language other than the one defined in the config.toml?
The link only shows up when I view base_url/ in a browser, if I try to view base_url/fr the link disappears.
Do I need to have multiple index.html for each language?
I was able to change the link of the home button, thank you!
I ran into another related issue earlier, I wanted to use a for loop to create links in the home page.
<div class="site-langs" style="opacity: .5;">
<span>Language: {% for lang in config.languages %}<a href="test">Some text</a>{% endfor %}</span>{# TODO translate the span content too #}
</div>
Zola says “Tried to iterate using key value on variable config.languages, but it is missing a key”.
What key is missing? Is it possible to iterate over the languages variable defined in config.toml like this?