docs: update zh-CN docs and fix some bugs
This commit is contained in:
@@ -83,6 +83,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"
|
||||
@@ -118,13 +120,6 @@ theme = "LoveIt"
|
||||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
[[menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "About"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 4
|
||||
```
|
||||
|
||||
{{< admonition >}}
|
||||
@@ -136,7 +131,7 @@ When building the website, you can set a theme by using `--theme` option. Howeve
|
||||
Here is the way to create your first post:
|
||||
|
||||
```bash
|
||||
hugo new posts/first_post.md
|
||||
hugo new posts/first_post.md
|
||||
```
|
||||
|
||||
Feel free to edit the post file by adding some sample content and replacing the title value in the beginning of the file.
|
||||
@@ -191,7 +186,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")
|
||||
@@ -225,7 +220,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
|
||||
@@ -359,7 +354,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 = ""
|
||||
@@ -528,7 +523,7 @@ Note that some of these parameters are explained in details in other sections of
|
||||
taxonomyTerm = ["HTML"]
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### 3.2 Favicons, Browserconfig, Manifest
|
||||
|
||||
@@ -584,7 +579,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]
|
||||
@@ -614,49 +609,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
|
||||
@@ -684,13 +666,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.
|
||||
|
||||
Reference in New Issue
Block a user