chore: update docs and style (#269)
This commit is contained in:
@@ -29,7 +29,7 @@ toc:
|
||||
直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [:(far fa-file-archive fa-fw): Hugo extended (> 0.62.0)](https://gohugo.io/getting-started/installing/).
|
||||
|
||||
{{< admonition note "为什么不支持早期版本的 Hugo?" >}}
|
||||
由于 [Markdown 渲染钩子函数](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) 在 [Hugo 圣诞节版本](https://gohugo.io/news/0.62.0-relnotes/) 中被引入, 本主题只支持高于 **0.62.0** 的 Hugo 版本.
|
||||
由于 [Markdown 渲染钩子函数](https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks) 在 [Hugo 圣诞节版本](https://gohugo.io/news/0.62.0-relnotes/) 中被引入, 本主题只支持高于 **0.62.0** 的 Hugo 版本.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition note "为什么需要 Hugo extended 版本?" >}}
|
||||
@@ -184,9 +184,7 @@ hugo
|
||||
|
||||
除了 [Hugo 全局配置](https://gohugo.io/overview/configuration/) 和 [菜单配置](#basic-configuration) 之外, **LoveIt** 主题还允许您在网站配置中定义以下参数 (这是一个示例 `config.toml`, 其内容为默认值).
|
||||
|
||||
{{< admonition >}}
|
||||
请注意, 本文档其他部分将详细解释其中一些参数.
|
||||
{{< /admonition >}}
|
||||
请打开下面的代码块查看完整的示例配置 :(far fa-hand-point-down fa-fw)::
|
||||
|
||||
```toml
|
||||
[params]
|
||||
@@ -423,44 +421,44 @@ hugo
|
||||
lightStyle = "mapbox://styles/mapbox/light-v9"
|
||||
# 深色主题的地图样式
|
||||
darkStyle = "mapbox://styles/mapbox/dark-v9"
|
||||
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}}
|
||||
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol" NavigationControl >}}
|
||||
navigation = true
|
||||
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}}
|
||||
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol" GeolocateControl >}}
|
||||
geolocate = true
|
||||
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}}
|
||||
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol" ScaleControl >}}
|
||||
scale = true
|
||||
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}}
|
||||
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol" FullscreenControl >}}
|
||||
fullscreen = true
|
||||
# {{< version 0.2.0 changed >}} 文章页面的分享信息设置
|
||||
[params.page.share]
|
||||
enable = true
|
||||
Twitter = true
|
||||
Facebook = true
|
||||
# Linkedin = true
|
||||
# Whatsapp = true
|
||||
# Pinterest = true
|
||||
# Tumblr = true
|
||||
# HackerNews = true
|
||||
# Reddit = true
|
||||
# VK = true
|
||||
# Buffer = true
|
||||
# Xing = true
|
||||
# Line = true
|
||||
# Instapaper = true
|
||||
# Pocket = true
|
||||
# Digg = true
|
||||
# Stumbleupon = true
|
||||
# Flipboard = true
|
||||
Linkedin = false
|
||||
Whatsapp = true
|
||||
Pinterest = false
|
||||
Tumblr = false
|
||||
HackerNews = false
|
||||
Reddit = false
|
||||
VK = false
|
||||
Buffer = false
|
||||
Xing = false
|
||||
Line = true
|
||||
Instapaper = false
|
||||
Pocket = false
|
||||
Digg = false
|
||||
Stumbleupon = false
|
||||
Flipboard = false
|
||||
Weibo = true
|
||||
# Renren = true
|
||||
# Myspace = true
|
||||
# Blogger = true
|
||||
# Baidu = true
|
||||
# Odnoklassniki = true
|
||||
Renren = false
|
||||
Myspace = true
|
||||
Blogger = true
|
||||
Baidu = false
|
||||
Odnoklassniki = false
|
||||
Evernote = true
|
||||
# Skype = true
|
||||
# Trello = true
|
||||
# Mix = true
|
||||
Skype = false
|
||||
Trello = false
|
||||
Mix = false
|
||||
# {{< version 0.2.0 changed >}} 评论系统设置
|
||||
[params.page.comment]
|
||||
enable = true
|
||||
@@ -655,7 +653,7 @@ hugo
|
||||
filename = "sitemap.xml"
|
||||
priority = 0.5
|
||||
|
||||
# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks 配置" >}}
|
||||
# {{< link "https://gohugo.io/content-management/urls#permalinks" "Permalinks 配置" >}}
|
||||
[Permalinks]
|
||||
# posts = ":year/:month/:filename"
|
||||
posts = ":filename"
|
||||
@@ -691,6 +689,20 @@ hugo
|
||||
taxonomyTerm = ["HTML"]
|
||||
```
|
||||
|
||||
{{< admonition >}}
|
||||
请注意, 本文档其他部分将详细解释其中一些参数.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition note "Hugo 的运行环境" >}}
|
||||
`hugo serve` 的默认运行环境是 `development`,
|
||||
而 `hugo` 的默认运行环境是 `production`.
|
||||
|
||||
由于本地 `development` 环境的限制,
|
||||
**评论系统**, **CDN** 和 **fingerprint** 不会在 `development` 环境下启用.
|
||||
|
||||
你可以使用 `hugo serve -e production` 命令来开启这些特性.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition tip "关于 CDN 配置的技巧" >}}
|
||||
在 CDN 的配置中, 完整的 HTML 标签和 URL 都是支持的:
|
||||
|
||||
@@ -906,7 +918,7 @@ defaultContentLanguage = "zh-cn"
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition tip >}}
|
||||
也可以使用 [文章前置参数](https://gohugo.io/content-management/multilingual/#translate-your-content) 来翻译网址.
|
||||
也可以使用 [文章前置参数](https://gohugo.io/content-management/multilingual#translate-your-content) 来翻译网址.
|
||||
{{< /admonition >}}
|
||||
|
||||
### 4.3 修改默认的翻译字符串
|
||||
@@ -953,6 +965,8 @@ defaultContentLanguage = "zh-cn"
|
||||
```
|
||||
|
||||
{{< admonition note "怎样选择搜索引擎的类型?" >}}
|
||||
以下是两种搜索引擎的对比:
|
||||
|
||||
* `lunr`: 简单, 无需同步 `index.json`, 没有 `contentLength` 的限制, 但占用带宽大且性能低 (特别是中文需要一个较大的分词依赖库)
|
||||
* `algolia`: 高性能并且占用带宽低, 但需要同步 `index.json` 且有 `contentLength` 的限制
|
||||
{{< /admonition >}}
|
||||
|
||||
Reference in New Issue
Block a user