shoui520.github.io
shoui520.github.io copied to clipboard
A better way to enable language switcher for TheMoeWay site
I talked to shoui about this and have already submitted the translation. But there's a problem, there is no bugless way to do so, another option is to use mkdocs-static-i18n but as shoui himself/herself (idk) stated:
I can't change the hyperlinks
it will break SEO and peoples bookmarks
i will not add /en/
I finally came up with a better solution: using Github Pages to host the translated versions. Here is the config snippet:
extra:
alternate:
- name: English
link: /
lang: en
- name: Tiếng Việt
link: https://daihocmo.github.io/tieng-nhat/
lang: vi
If you change the language to Tiếng Việt (Vietnamese), it will redirect to the Vietnamese site (which is hosted on Github Pages, in another repo)