risotto icon indicating copy to clipboard operation
risotto copied to clipboard

Current page detection & links of translations for multilingual mode

Open bedefaced opened this issue 3 years ago • 0 comments

Small fixes I've done for my personal purposes. Maybe you will like it too.

  1. 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/"
  1. 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"
  1. Added default charset (UTF-8) in 'head.html'.

bedefaced avatar Aug 31 '21 02:08 bedefaced