aaranxu / adidoks

AdiDoks is a mordern documentation theme, which is a port of the Hugo theme Doks for Zola.
https://adidoks.org
MIT License
220 stars 80 forks source link

Allow translating menus for multilanguage sites #15

Closed tkarkkainen closed 2 years ago

tkarkkainen commented 2 years ago

I made it possible to define main menu entries in content/_index.md for the default language and in content/_index.lang.md for translated pages in multilingual sites. I created an example Finnish translation as well.

Due to issue in Zola, this does not work in Zola 0.14.1. I am unable to test with an earlier version at the moment. Marking this PR as draft until it can be properly tested.

This functionality and logic could be easily extended to the footer menu as well.

craigdrown commented 2 years ago

@aaranxu can this be merged now that Zola fix is through? Thanks!

tkarkkainen commented 2 years ago

I gave it a quick test with the new Zola 0.15.3 and it seems to work (i.e. no errors from Zola, page loads fine).

Removed draft status.

aaranxu commented 2 years ago

Great job and thanks.