risotto
risotto copied to clipboard
Current page detection & links of translations for multilingual mode
Small fixes I've done for my personal purposes. Maybe you will like it too.
- Small fix for current single page detection by absolute URL comparing (inspired by ".IsMenuCurrent returns false for single pages" thread).
NB: it seems that user should add / to the end of 'url' menu entry param for correct absolute URLs comparing (
url = "/projects/"
) in config:
[[menu.main]]
identifier = "projects"
name = "projects"
weight = 20
url = "/projects/"
- Added multilingual mode switcher in the footer (footer.html, before "copyright") with list of links for existing translations of current page in the form of shell commands like menu entries (example output). In config:
[languages]
[languages.ru]
LanguageName = "русский"
[languages.en]
LanguageName = "english"
- Added default charset (UTF-8) in 'head.html'.