chore(docs): refactor config docs
Signed-off-by: Dillon <dillonzq@outlook.com>
This commit is contained in:
@@ -77,17 +77,28 @@ 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"
|
||||
|
||||
# Change the default theme to be use when building the site with Hugo
|
||||
theme = "LoveIt"
|
||||
|
||||
# website title
|
||||
title = "My New Hugo Site"
|
||||
|
||||
# language code ["en", "zh-CN", "fr", "pl", ...]
|
||||
languageCode = "en"
|
||||
# language name ["English", "简体中文", "Français", "Polski", ...]
|
||||
languageName = "English"
|
||||
|
||||
# Author config
|
||||
[author]
|
||||
name = "xxxx"
|
||||
email = ""
|
||||
link = ""
|
||||
|
||||
# Menu config
|
||||
[menu]
|
||||
[[menu.main]]
|
||||
weight = 1
|
||||
identifier = "posts"
|
||||
# you can add extra information before the name (HTML format is supported), such as icons
|
||||
pre = ""
|
||||
@@ -97,23 +108,22 @@ theme = "LoveIt"
|
||||
url = "/posts/"
|
||||
# title will be shown when you hover on this menu link
|
||||
title = ""
|
||||
weight = 1
|
||||
[[menu.main]]
|
||||
weight = 2
|
||||
identifier = "tags"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "Tags"
|
||||
url = "/tags/"
|
||||
title = ""
|
||||
weight = 2
|
||||
[[menu.main]]
|
||||
weight = 3
|
||||
identifier = "categories"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "Categories"
|
||||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
|
||||
# Markup related configuration in Hugo
|
||||
[markup]
|
||||
@@ -191,12 +201,12 @@ Please open the code block below to view the complete sample configuration :(far
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# site default theme ("light", "dark", "auto")
|
||||
# site default theme ["auto", "light", "dark"]
|
||||
defaultTheme = "auto"
|
||||
# public git repo url only then enableGitInfo is true
|
||||
gitRepo = ""
|
||||
# {{< version 0.1.1 >}} which hash function used for SRI, when empty, no SRI is used
|
||||
# ("sha256", "sha384", "sha512", "md5")
|
||||
# ["sha256", "sha384", "sha512", "md5"]
|
||||
fingerprint = ""
|
||||
# {{< version 0.2.0 >}} date format
|
||||
dateFormat = "2006-01-02"
|
||||
@@ -209,9 +219,9 @@ Please open the code block below to view the complete sample configuration :(far
|
||||
|
||||
# Header config
|
||||
[params.header]
|
||||
# desktop header mode ("fixed", "normal", "auto")
|
||||
# desktop header mode ["fixed", "normal", "auto"]
|
||||
desktopMode = "fixed"
|
||||
# mobile header mode ("fixed", "normal", "auto")
|
||||
# mobile header mode ["fixed", "normal", "auto"]
|
||||
mobileMode = "auto"
|
||||
# {{< version 0.2.0 >}} Header title config
|
||||
[params.header.title]
|
||||
@@ -280,7 +290,7 @@ Please open the code block below to view the complete sample configuration :(far
|
||||
# {{< version 0.2.0 >}} Search config
|
||||
[params.search]
|
||||
enable = true
|
||||
# type of search engine ("lunr", "algolia")
|
||||
# type of search engine ["lunr", "algolia"]
|
||||
type = "lunr"
|
||||
# max index length of the chunked content
|
||||
contentLength = 4000
|
||||
@@ -518,7 +528,7 @@ Please open the code block below to view the complete sample configuration :(far
|
||||
enableQQ = false
|
||||
serverURLs = ""
|
||||
# {{< version 0.2.6 >}} emoji data file name, default is "google.yml"
|
||||
# ("apple.yml", "google.yml", "facebook.yml", "twitter.yml")
|
||||
# ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"]
|
||||
# located in "themes/LoveIt/assets/data/emoji/" directory
|
||||
# you can store your own data files in the same path under your project:
|
||||
# "assets/data/emoji/"
|
||||
@@ -625,7 +635,7 @@ Please open the code block below to view the complete sample configuration :(far
|
||||
# {{< version 0.2.7 changed >}} CDN config for third-party library files
|
||||
[params.cdn]
|
||||
# CDN data file name, disabled by default
|
||||
# ("jsdelivr.yml")
|
||||
# ["jsdelivr.yml"]
|
||||
# located in "themes/LoveIt/assets/data/cdn/" directory
|
||||
# you can store your own data files in the same path under your project:
|
||||
# "assets/data/cdn/"
|
||||
@@ -667,12 +677,6 @@ Please open the code block below to view the complete sample configuration :(far
|
||||
startLevel = 2
|
||||
endLevel = 6
|
||||
|
||||
# Author config
|
||||
[author]
|
||||
name = "xxxx"
|
||||
email = ""
|
||||
link = ""
|
||||
|
||||
# Sitemap config
|
||||
[sitemap]
|
||||
changefreq = "weekly"
|
||||
@@ -734,7 +738,7 @@ You could enable these features with `hugo serve -e production`.
|
||||
```toml
|
||||
[params.cdn]
|
||||
# CDN data file name, disabled by default
|
||||
# ("jsdelivr.yml")
|
||||
# ["jsdelivr.yml"]
|
||||
data = ""
|
||||
````
|
||||
|
||||
@@ -847,7 +851,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, pl, ...] determines default content language
|
||||
# determines default content language ["en", "zh-cn", "fr", "pl", ...]
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
[languages]
|
||||
@@ -857,62 +861,60 @@ defaultContentLanguage = "en"
|
||||
languageCode = "en"
|
||||
languageName = "English"
|
||||
[[languages.en.menu.main]]
|
||||
weight = 1
|
||||
identifier = "posts"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "Posts"
|
||||
url = "/posts/"
|
||||
title = ""
|
||||
weight = 1
|
||||
[[languages.en.menu.main]]
|
||||
weight = 2
|
||||
identifier = "tags"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "Tags"
|
||||
url = "/tags/"
|
||||
title = ""
|
||||
weight = 2
|
||||
[[languages.en.menu.main]]
|
||||
weight = 3
|
||||
identifier = "categories"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "Categories"
|
||||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
|
||||
[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]]
|
||||
weight = 1
|
||||
identifier = "posts"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "文章"
|
||||
url = "/posts/"
|
||||
title = ""
|
||||
weight = 1
|
||||
[[languages.zh-cn.menu.main]]
|
||||
weight = 2
|
||||
identifier = "tags"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "标签"
|
||||
url = "/tags/"
|
||||
title = ""
|
||||
weight = 2
|
||||
[[languages.zh-cn.menu.main]]
|
||||
weight = 3
|
||||
identifier = "categories"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "分类"
|
||||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
|
||||
[languages.fr]
|
||||
weight = 3
|
||||
@@ -920,29 +922,29 @@ defaultContentLanguage = "en"
|
||||
languageCode = "fr"
|
||||
languageName = "Français"
|
||||
[[languages.fr.menu.main]]
|
||||
weight = 1
|
||||
identifier = "posts"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "Postes"
|
||||
url = "/posts/"
|
||||
title = ""
|
||||
weight = 1
|
||||
[[languages.fr.menu.main]]
|
||||
weight = 2
|
||||
identifier = "tags"
|
||||
pre = ""
|
||||
post = ""
|
||||
name = "Balises"
|
||||
url = "/tags/"
|
||||
title = ""
|
||||
weight = 2
|
||||
[[languages.fr.menu.main]]
|
||||
weight = 3
|
||||
identifier = "categories"
|
||||
name = "Catégories"
|
||||
pre = ""
|
||||
post = ""
|
||||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
```
|
||||
|
||||
Then, for each new page, append the language code to the file name.
|
||||
@@ -993,7 +995,7 @@ Here is the search configuration in your [site configuration](#site-configuratio
|
||||
```toml
|
||||
[params.search]
|
||||
enable = true
|
||||
# type of search engine ("lunr", "algolia")
|
||||
# type of search engine ["lunr", "algolia"]
|
||||
type = "lunr"
|
||||
# max index length of the chunked content
|
||||
contentLength = 4000
|
||||
|
||||
Reference in New Issue
Block a user