welpo / tabi

A modern Zola theme with search, multilingual support, optional JavaScript, a perfect Lighthouse score, and a focus on accessibility.
https://welpo.github.io/tabi/
MIT License
97 stars 32 forks source link

How do I set a default language for my site? #252

Closed ziyouwa closed 5 months ago

ziyouwa commented 5 months ago

I followed it to set as below:

base_url = "https://xxx.xx.xx"
title = "XXX"
description = "xxx"
author = "xxx"
generate_feed = true
compile_sass = true
minify_html = true
build_search_index = true

theme = "tabi"

default_language = "zh"

taxonomies = [{name = "tags", feed = true}]

[search]
...
[link_checker]
internal_level = "warn"

[languages.zh-Hans]
title = "中文"
description = "中文"
author = "中文"
build_search_index = false
taxonomies = [{name = "tags", feed = true}]

[extra]
...

but default display english. If change [languages.zh-Hans] to [languages.zh] , it show error than xxxx is specified twice. How to correctly set the default language to Chinese?

ziyouwa commented 5 months ago

I try to also set default_language = "zh-Hans", it show the error xxx twice specified.

welpo commented 5 months ago
base_url = "https://xxx.xx.xx"
title = "中文"
description = "中文"
author = "中文"
generate_feed = true
compile_sass = true
minify_html = true
build_search_index = true

theme = "tabi"

default_language = "zh-Hans"

taxonomies = [{name = "tags", feed = true}]

[search]
...
[link_checker]
internal_level = "warn"

[extra]
...