docs: update zh-CN docs and fix some bugs

This commit is contained in:
Dillon
2020-03-10 03:33:28 +08:00
parent 426e24598d
commit fb9a9e7324
27 changed files with 159 additions and 227 deletions

View File

@@ -78,6 +78,8 @@ The following is a basic configuration for the LoveIt theme:
```toml
baseURL = "http://example.org/"
# [en, zh-cn, fr, ...] determines default content language
defaultContentLanguage = "en"
# language code
languageCode = "en"
title = "My New Hugo Site"
@@ -113,13 +115,6 @@ theme = "LoveIt"
url = "/categories/"
title = ""
weight = 3
[[menu.main]]
identifier = "about"
pre = ""
name = "About"
url = "/about/"
title = ""
weight = 4
```
{{< admonition >}}
@@ -186,7 +181,7 @@ Note that some of these parameters are explained in details in other sections of
# LoveIt theme version
version = "0.1.X"
# site description
description = "About LoveIt Theme"
description = "This is My New Hugo Site"
# site keywords
keywords = ["Theme", "Hugo"]
# site default theme ("light", "dark", "auto")
@@ -220,7 +215,7 @@ Note that some of these parameters are explained in details in other sections of
# URL of avatar shown in home page
avatarURL = "/images/avatar.png"
# subtitle shown in home page
subtitle = "This is my new hugo site"
subtitle = "This is My New Hugo Site"
# whether to use typeit animation for subtitle
typeit = true
# whether to show social links
@@ -354,7 +349,7 @@ Note that some of these parameters are explained in details in other sections of
# Disqus Comment Config (https://disqus.com/)
[params.comment.disqus]
# Disqus shortname to use Disqus in posts
shortname = "dillonzq"
shortname = ""
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
[params.comment.gitalk]
owner = ""
@@ -523,7 +518,7 @@ Note that some of these parameters are explained in details in other sections of
taxonomyTerm = ["HTML"]
```
![Complete configuration preview](/images/theme-documentation-basics/complete-configuration-preview.gif "Complete configuration preview")
![Complete configuration preview](/images/theme-documentation-basics/complete-configuration-preview.png "Complete configuration preview")
### 3.2 Favicons, Browserconfig, Manifest
@@ -579,7 +574,7 @@ After learning [how Hugo handle multilingual websites](https://gohugo.io/content
For example with English, Chinese and French website:
```toml
# [en, zh-CN, fr, ...] determines default content language
# [en, zh-cn, fr, ...] determines default content language
defaultContentLanguage = "en"
[languages]
@@ -609,49 +604,36 @@ defaultContentLanguage = "en"
url = "/categories/"
title = ""
weight = 3
[[languages.en.menu.main]]
identifier = "about"
pre = ""
name = "About"
url = "/about/"
title = ""
weight = 4
[languages.zh-CN]
[languages.zh-cn]
weight = 2
title = "我的全新 Hugo 网站"
# language code, CN only here
languageCode = "zh-CN"
languageName = "简体中文"
# whether to include Chinese/Japanese/Korean
hasCJKLanguage = true
[[languages.zh-CN.menu.main]]
[[languages.zh-cn.menu.main]]
identifier = "posts"
pre = ""
name = "文章"
url = "/posts/"
title = ""
weight = 1
[[languages.zh-CN.menu.main]]
[[languages.zh-cn.menu.main]]
identifier = "tags"
pre = ""
name = "标签"
url = "/tags/"
title = ""
weight = 2
[[languages.zh-CN.menu.main]]
[[languages.zh-cn.menu.main]]
identifier = "categories"
pre = ""
name = "分类"
url = "/categories/"
title = ""
weight = 3
[[languages.zh-CN.menu.main]]
identifier = "about"
pre = ""
name = "关于"
url = "/about/"
title = ""
weight = 4
[languages.fr]
weight = 3
@@ -679,13 +661,6 @@ defaultContentLanguage = "en"
url = "/categories/"
title = ""
weight = 3
[[languages.fr.menu.main]]
identifier = "about"
pre = ""
name = "À propos"
url = "/about/"
title = ""
weight = 4
```
Then, for each new page, append the language code to the file name.