diff options
author | Dillon <dillonzq@outlook.com> | 2020-04-27 20:38:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 20:38:22 +0300 |
commit | 6805d695f6ee1ba6b774a9ae518b85c8030bfa08 (patch) | |
tree | 7af9ef0530b345ba0805ce4db4bdb8fa6c0de381 /exampleSite | |
parent | b46c81053f7a4307945b82bee6944af7e6e13d1c (diff) |
chore: update docs and style (#269)
Diffstat (limited to 'exampleSite')
22 files changed, 317 insertions, 259 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8847adc..be701b3 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -774,31 +774,31 @@ enableEmoji = true enable = true Twitter = true Facebook = true - # Linkedin = true - # Whatsapp = true - # Pinterest = true - # Tumblr = true - # HackerNews = true - # Reddit = true - # VK = true - # Buffer = true - # Xing = true + Linkedin = false + Whatsapp = true + Pinterest = false + Tumblr = false + HackerNews = false + Reddit = false + VK = false + Buffer = false + Xing = false Line = true - # Instapaper = true - # Pocket = true - # Digg = true - # Stumbleupon = true - # Flipboard = 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 # Comment config # 评论系统设置 [params.page.comment] diff --git a/exampleSite/content/about.en.md b/exampleSite/content/about.en.md index bd152ea..d097a39 100644 --- a/exampleSite/content/about.en.md +++ b/exampleSite/content/about.en.md @@ -17,9 +17,9 @@ math: [![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork) {{< /style >}} -[:(far fa-kiss-wink-heart fa-fw): LoveIt](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com). - -It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/). +> [:(far fa-kiss-wink-heart fa-fw): LoveIt](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com). +> +> It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/liuzc/LeaveIt). ![Hugo Theme LoveIt](/images/Apple-Devices-Preview.png "Hugo Theme LoveIt") diff --git a/exampleSite/content/about.fr.md b/exampleSite/content/about.fr.md index ae6ef47..118c2a7 100644 --- a/exampleSite/content/about.fr.md +++ b/exampleSite/content/about.fr.md @@ -22,9 +22,9 @@ Sorry, this article has not been completely translated into **French**. Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme! {{< /admonition >}} -[:(far fa-kiss-wink-heart fa-fw): LoveIt](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com). - -It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/). +> [:(far fa-kiss-wink-heart fa-fw): LoveIt](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com). +> +> It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/liuzc/LeaveIt). ![Hugo Theme LoveIt](/images/Apple-Devices-Preview.png "Hugo Theme LoveIt") diff --git a/exampleSite/content/about.zh-cn.md b/exampleSite/content/about.zh-cn.md index 7df1891..96a2021 100644 --- a/exampleSite/content/about.zh-cn.md +++ b/exampleSite/content/about.zh-cn.md @@ -17,9 +17,9 @@ math: [![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork) {{< /style >}} -[:(far fa-kiss-wink-heart fa-fw): LoveIt](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。 - -它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt/) 和 [KeepIt 主题](https://github.com/liuzc/LeaveIt/)。 +> [:(far fa-kiss-wink-heart fa-fw): LoveIt](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。 +> +> 它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt) 和 [KeepIt 主题](https://github.com/liuzc/LeaveIt)。 ![Hugo 主题 LoveIt](/images/Apple-Devices-Preview.png "Hugo 主题 LoveIt") diff --git a/exampleSite/content/posts/basic-markdown-syntax.en.md b/exampleSite/content/posts/basic-markdown-syntax.en.md index 4c6c8c2..cf89f52 100644 --- a/exampleSite/content/posts/basic-markdown-syntax.en.md +++ b/exampleSite/content/posts/basic-markdown-syntax.en.md @@ -22,7 +22,7 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c {{< admonition >}} This article is a shameful copy of the great [Grav original page](http://learn.getgrav.org/content/markdown). -If you want to know about the extented Markdown syntax of **LoveIt** theme, please read [extended Markdown syntax page](../theme-documentation-content/#extended-markdown-syntax). +If you want to know about the extented Markdown syntax of **LoveIt** theme, please read [extended Markdown syntax page](../theme-documentation-content#extended-markdown-syntax). {{< /admonition >}} Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages. @@ -757,5 +757,5 @@ With a reference later in the document defining the URL location: [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" {{< admonition tip >}} -**LoveIt** theme has [special shortcode for image](../theme-documentation-extended-shortcodes/#image), which provides more features. +**LoveIt** theme has [special shortcode for image](../theme-documentation-extended-shortcodes#image), which provides more features. {{< /admonition >}} diff --git a/exampleSite/content/posts/basic-markdown-syntax.fr.md b/exampleSite/content/posts/basic-markdown-syntax.fr.md index 527c59e..0d70fa5 100644 --- a/exampleSite/content/posts/basic-markdown-syntax.fr.md +++ b/exampleSite/content/posts/basic-markdown-syntax.fr.md @@ -27,7 +27,7 @@ Welcome to take the time to propose a translation by [making a PR](https://githu {{< admonition >}} This article is a shameful copy of the great [Grav original page](http://learn.getgrav.org/content/markdown). -If you want to know about the extented Markdown syntax of **LoveIt** theme, please read [extended Markdown syntax page](../theme-documentation-content/#extended-markdown-syntax). +If you want to know about the extented Markdown syntax of **LoveIt** theme, please read [extended Markdown syntax page](../theme-documentation-content#extended-markdown-syntax). {{< /admonition >}} Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages. @@ -762,5 +762,5 @@ With a reference later in the document defining the URL location: [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" {{< admonition tip >}} -**LoveIt** theme has [special shortcode for image](../theme-documentation-extended-shortcodes/#image), which provides more features. +**LoveIt** theme has [special shortcode for image](../theme-documentation-extended-shortcodes#image), which provides more features. {{< /admonition >}} diff --git a/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md b/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md index 4f0444c..591ba16 100644 --- a/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md +++ b/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md @@ -22,7 +22,7 @@ lightgallery: true {{< admonition >}} 这篇文章借鉴了一篇很棒的[来自 Grav 的文章](http://learn.getgrav.org/content/markdown). -如果你想了解 **Loveit** 主题的扩展 Markdown 语法, 请阅读[扩展 Markdown 语法页面](../theme-documentation-content/#extended-markdown-syntax). +如果你想了解 **Loveit** 主题的扩展 Markdown 语法, 请阅读[扩展 Markdown 语法页面](../theme-documentation-content#extended-markdown-syntax). {{< /admonition >}} 事实上, 编写 Web 内容很麻烦. [WYSIWYG]^(所见即所得) 编辑器帮助减轻了这一任务. 但通常会导致代码太糟, 或更糟糕的是, 网页也会很丑. @@ -393,13 +393,13 @@ odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac ```markdown 1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem +1. Consectetur adipiscing elit +1. Integer molestie lorem at massa +1. Facilisis in pretium nisl aliquet +1. Nulla volutpat aliquam velit +1. Faucibus porta lacus fringilla vel +1. Aenean sit amet erat nunc +1. Eget porttitor lorem ``` 呈现的输出效果如下: @@ -764,5 +764,5 @@ Content for chapter one. [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" {{< admonition tip >}} -**LoveIt** 主题提供了一个包含更多功能的 [图片的 shortcode](../theme-documentation-extended-shortcodes/#image). +**LoveIt** 主题提供了一个包含更多功能的 [图片的 shortcode](../theme-documentation-extended-shortcodes#image). {{< /admonition >}} diff --git a/exampleSite/content/posts/emoji-support.en.md b/exampleSite/content/posts/emoji-support.en.md index 6bd1896..d0ccfeb 100644 --- a/exampleSite/content/posts/emoji-support.en.md +++ b/exampleSite/content/posts/emoji-support.en.md @@ -20,9 +20,9 @@ Emoji can be enabled in a Hugo project in a number of ways. <!--more--> -The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). +The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates#inline-shortcodes). -To enable emoji globally, set `enableEmoji` to `true` in your site’s [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files. +To enable emoji globally, set `enableEmoji` to `true` in your [site configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files. These begin and end with a **colon** and include the **code** of an emoji: @@ -38,6 +38,12 @@ Gone camping! :tent: Be back soon. That is so funny! :joy: +{{< admonition tip "Enable Twemoji" >}} +This page enables `twemoji` to make emoji look beautiful everywhere. + +Set `twemoji` to `true` in your [front matter](../theme-documentation-content#front-matter) or in the `params.page` part of the [site configuration](https://gohugo.io/getting-started/configuration/) to use :(far fa-grin-tongue-wink fa-fw): Twemoji. +{{< /admonition >}} + ## Emoji Cheat Sheet The following cheat sheet is a useful reference for emoji shorthand codes. diff --git a/exampleSite/content/posts/emoji-support.fr.md b/exampleSite/content/posts/emoji-support.fr.md index bb8a8c9..10c97a2 100644 --- a/exampleSite/content/posts/emoji-support.fr.md +++ b/exampleSite/content/posts/emoji-support.fr.md @@ -25,9 +25,9 @@ Sorry, this article has not been completely translated into **French**. Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme! {{< /admonition >}} -The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). +The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates#inline-shortcodes). -To enable emoji globally, set `enableEmoji` to `true` in your site’s [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files. +To enable emoji globally, set `enableEmoji` to `true` in your [site configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files. These begin and end with a **colon** and include the **code** of an emoji: @@ -43,6 +43,12 @@ Gone camping! :tent: Be back soon. That is so funny! :joy: +{{< admonition tip "Enable Twemoji" >}} +This page enables `twemoji` to make emoji look beautiful everywhere. + +Set `twemoji` to `true` in your [front matter](../theme-documentation-content#front-matter) or in the `params.page` part of the [site configuration](https://gohugo.io/getting-started/configuration/) to use :(far fa-grin-tongue-wink fa-fw): Twemoji. +{{< /admonition >}} + ## Emoji Cheat Sheet The following cheat sheet is a useful reference for emoji shorthand codes. diff --git a/exampleSite/content/posts/emoji-support.zh-cn.md b/exampleSite/content/posts/emoji-support.zh-cn.md index 83b903f..3e78bb1 100644 --- a/exampleSite/content/posts/emoji-support.zh-cn.md +++ b/exampleSite/content/posts/emoji-support.zh-cn.md @@ -20,9 +20,9 @@ Emoji 可以通过多种方式在 Hugo 项目中启用. <!--more--> -[`emojify`](https://gohugo.io/functions/emojify/) 方法可以直接在模板中调用, 或者使用 [行内 Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). +[`emojify`](https://gohugo.io/functions/emojify/) 方法可以直接在模板中调用, 或者使用[行内 Shortcodes](https://gohugo.io/templates/shortcode-templates#inline-shortcodes). -要全局使用 emoji, 需要在你的网站 [配置](https://gohugo.io/getting-started/configuration/) 中设置 `enableEmoji` 为 `true`, +要全局使用 emoji, 需要在你的[网站配置](https://gohugo.io/getting-started/configuration/)中设置 `enableEmoji` 为 `true`, 然后你就可以直接在文章中输入 emoji 的代码. 它们以**冒号**开头和结尾,并且包含 emoji 的 **代码**: @@ -39,6 +39,12 @@ Emoji 可以通过多种方式在 Hugo 项目中启用. 真开心! :joy: +{{< admonition tip "使用 Twemoji" >}} +这个页面使用了 `twemoji` 来使 emoji 具有一致的美观性. + +请在文章的[前置参数](../theme-documentation-content#front-matter) 或 [网站配置](../theme-documentation-basics#site-configuration) 的 `params.page` 部分中将 `twemoji` 设置为 `true` 来使用 :(far fa-grin-tongue-wink fa-fw): Twemoji. +{{< /admonition >}} + ## Emoji 符号清单 以下清单是 emoji 代码的非常有用的参考. diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md index 3b65891..ddacc90 100644 --- a/exampleSite/content/posts/theme-documentation-basics.en.md +++ b/exampleSite/content/posts/theme-documentation-basics.en.md @@ -29,7 +29,7 @@ Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only depende Just install latest version of [:(far fa-file-archive fa-fw): Hugo extended (> 0.62.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**). {{< admonition note "Why not support earlier versions of Hugo?" >}} -Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **0.62.0**. +Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **0.62.0**. {{< /admonition >}} {{< admonition note "Why need the Hugo extended version?" >}} @@ -181,9 +181,7 @@ Alternatively, you can use [AWS Amplify](https://gohugo.io/hosting-and-deploymen In addition to [Hugo global configuration](https://gohugo.io/overview/configuration/) and [menu configuration](#basic-configuration), **LoveIt** lets you define the following parameters in your site configuration (here is a `config.toml`, whose values are default). -{{< admonition >}} -Note that some of these parameters are explained in details in other sections of this documentation. -{{< /admonition >}} +Please open the code block below to view the complete sample configuration :(far fa-hand-point-down fa-fw):: ```toml [params] @@ -420,44 +418,44 @@ Note that some of these parameters are explained in details in other sections of lightStyle = "mapbox://styles/mapbox/light-v9" # style for the dark theme darkStyle = "mapbox://styles/mapbox/dark-v9" - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}} + # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol" NavigationControl >}} navigation = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}} + # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol" GeolocateControl >}} geolocate = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}} + # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol" ScaleControl >}} scale = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}} + # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol" FullscreenControl >}} fullscreen = true # {{< version 0.2.0 changed >}} social share links in post page [params.page.share] enable = true Twitter = true Facebook = true - Linkedin = true + Linkedin = false 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 - # Weibo = true - # Renren = true - # Myspace = true - # Blogger = true - # Baidu = true - # Odnoklassniki = true - # Evernote = true - # Skype = true - # Trello = true - # Mix = 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 = false + Myspace = true + Blogger = true + Baidu = false + Odnoklassniki = false + Evernote = true + Skype = false + Trello = false + Mix = false # {{< version 0.2.0 changed >}} Comment config [params.page.comment] enable = true @@ -652,7 +650,7 @@ Note that some of these parameters are explained in details in other sections of filename = "sitemap.xml" priority = 0.5 -# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks config" >}} +# {{< link "https://gohugo.io/content-management/urls#permalinks" "Permalinks config" >}} [Permalinks] # posts = ":year/:month/:filename" posts = ":filename" @@ -688,6 +686,19 @@ Note that some of these parameters are explained in details in other sections of taxonomyTerm = ["HTML"] ``` +{{< admonition >}} +Note that some of these parameters are explained in details in other sections of this documentation. +{{< /admonition >}} + +{{< admonition note "Hugo environments" >}} +Default environments are `development` with `hugo serve` and `production` with `hugo`. + +Due to limitations in the local `development` environment, +the **comment system**, **CDN** and **fingerprint** will not be enabled in the `development` environment. + +You could enable these features with `hugo serve -e production`. +{{< /admonition >}} + {{< admonition tip "Tips about CDN Configuration" >}} Full HTML tags or URLs are supported for CDN configuration: @@ -903,7 +914,7 @@ Be aware that only translated pages are displayed in menu. It’s not replaced w {{< /admonition >}} {{< admonition tip >}} -Use [Front Matter parameter](https://gohugo.io/content-management/multilingual/#translate-your-content) to translate urls too. +Use [Front Matter parameter](https://gohugo.io/content-management/multilingual#translate-your-content) to translate urls too. {{< /admonition >}} ### 4.3 Overwrite Translation Strings @@ -949,6 +960,8 @@ Here is the search configuration in your [site configuration](#site-configuratio ``` {{< admonition note "How to choose the type of search engine?" >}} +The following is a comparison of two search engines: + * `lunr`: simple, no need to synchronize `index.json`, no limit for `contentLength`, but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library) * `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength` diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md index 0b13945..9ed8396 100644 --- a/exampleSite/content/posts/theme-documentation-basics.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics.fr.md @@ -34,7 +34,7 @@ Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only depende Just install latest version of [:(far fa-file-archive fa-fw): Hugo extended (> 0.62.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**). {{< admonition note "Why not support earlier versions of Hugo?" >}} -Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **0.62.0**. +Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **0.62.0**. {{< /admonition >}} {{< admonition note "Why need the Hugo extended version?" >}} @@ -186,9 +186,7 @@ Alternatively, you can use [AWS Amplify](https://gohugo.io/hosting-and-deploymen In addition to [Hugo global configuration](https://gohugo.io/overview/configuration/) and [menu configuration](#basic-configuration), **LoveIt** lets you define the following parameters in your site configuration (here is a `config.toml`, whose values are default). -{{< admonition >}} -Note that some of these parameters are explained in details in other sections of this documentation. -{{< /admonition >}} +Please open the code block below to view the complete sample configuration :(far fa-hand-point-down fa-fw):: ```toml [params] @@ -425,44 +423,44 @@ Note that some of these parameters are explained in details in other sections of lightStyle = "mapbox://styles/mapbox/light-v9" # style for the dark theme darkStyle = "mapbox://styles/mapbox/dark-v9" - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}} + # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol" NavigationControl >}} navigation = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}} + # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol" GeolocateControl >}} geolocate = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}} + # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol" ScaleControl >}} scale = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}} + # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol" FullscreenControl >}} fullscreen = true # {{< version 0.2.0 changed >}} social share links in post page [params.page.share] enable = true Twitter = true Facebook = true - Linkedin = true + Linkedin = false 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 - # Weibo = true - # Renren = true - # Myspace = true - # Blogger = true - # Baidu = true - # Odnoklassniki = true - # Evernote = true - # Skype = true - # Trello = true - # Mix = 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 = false + Myspace = true + Blogger = true + Baidu = false + Odnoklassniki = false + Evernote = true + Skype = false + Trello = false + Mix = false # {{< version 0.2.0 changed >}} Comment config [params.page.comment] enable = true @@ -657,7 +655,7 @@ Note that some of these parameters are explained in details in other sections of filename = "sitemap.xml" priority = 0.5 -# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks config" >}} +# {{< link "https://gohugo.io/content-management/urls#permalinks" "Permalinks config" >}} [Permalinks] # posts = ":year/:month/:filename" posts = ":filename" @@ -693,6 +691,19 @@ Note that some of these parameters are explained in details in other sections of taxonomyTerm = ["HTML"] ``` +{{< admonition >}} +Note that some of these parameters are explained in details in other sections of this documentation. +{{< /admonition >}} + +{{< admonition note "Hugo environments" >}} +Default environments are `development` with `hugo serve` and `production` with `hugo`. + +Due to limitations in the local `development` environment, +the **comment system**, **CDN** and **fingerprint** will not be enabled in the `development` environment. + +You could enable these features with `hugo serve -e production`. +{{< /admonition >}} + {{< admonition tip "Tips about CDN Configuration" >}} Full HTML tags or URLs are supported for CDN configuration: @@ -908,7 +919,7 @@ Be aware that only translated pages are displayed in menu. It’s not replaced w {{< /admonition >}} {{< admonition tip >}} -Use [Front Matter parameter](https://gohugo.io/content-management/multilingual/#translate-your-content) to translate urls too. +Use [Front Matter parameter](https://gohugo.io/content-management/multilingual#translate-your-content) to translate urls too. {{< /admonition >}} ### 4.3 Overwrite Translation Strings @@ -954,6 +965,8 @@ Here is the search configuration in your [site configuration](#site-configuratio ``` {{< admonition note "How to choose the type of search engine?" >}} +The following is a comparison of two search engines: + * `lunr`: simple, no need to synchronize `index.json`, no limit for `contentLength`, but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library) * `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength` diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md index 1976dfe..95b0cbb 100644 --- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md @@ -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 >}} diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md index 1621cc0..f61d94a 100644 --- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md +++ b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md @@ -30,7 +30,7 @@ Hugo ships with a set of predefined shortcodes that represent very common usage. ## figure {#figure} -[Documentation of `figure`](https://gohugo.io/content-management/shortcodes/#figure) +[Documentation of `figure`](https://gohugo.io/content-management/shortcodes#figure) Example `figure` input: @@ -55,7 +55,7 @@ The HTML looks like this: ## gist -[Documentation of `gist`](https://gohugo.io/content-management/shortcodes/#gist) +[Documentation of `gist`](https://gohugo.io/content-management/shortcodes#gist) Example `gist` input: @@ -75,7 +75,7 @@ The HTML looks like this: ## highlight -[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes/#instagram) +[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes#instagram) Example `highlight` input: @@ -107,7 +107,7 @@ The rendered output looks like this: ## instagram -[Documentation of `instagram`](https://gohugo.io/content-management/shortcodes/#instagram) +[Documentation of `instagram`](https://gohugo.io/content-management/shortcodes#instagram) Example `instagram` input: @@ -121,7 +121,7 @@ The rendered output looks like this: ## param -[Documentation of `param`](https://gohugo.io/content-management/shortcodes/#param) +[Documentation of `param`](https://gohugo.io/content-management/shortcodes#param) Example `param` input: @@ -135,11 +135,11 @@ The rendered output looks like this: ## ref and relref {#ref-and-relref} -[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes/#ref-and-relref) +[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes#ref-and-relref) ## tweet -[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes/#tweet) +[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes#tweet) Example `tweet` input: @@ -153,7 +153,7 @@ The rendered output looks like this: ## vimeo -[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes/#vimeo) +[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes#vimeo) Example `vimeo` input: @@ -167,7 +167,7 @@ The rendered output looks like this: ## youtube -[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes/#youtube) +[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes#youtube) Example `youtube` input: diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md index 4a04869..e9752db 100644 --- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md +++ b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md @@ -35,7 +35,7 @@ Hugo ships with a set of predefined shortcodes that represent very common usage. ## figure {#figure} -[Documentation of `figure`](https://gohugo.io/content-management/shortcodes/#figure) +[Documentation of `figure`](https://gohugo.io/content-management/shortcodes#figure) Example `figure` input: @@ -60,7 +60,7 @@ The HTML looks like this: ## gist -[Documentation of `gist`](https://gohugo.io/content-management/shortcodes/#gist) +[Documentation of `gist`](https://gohugo.io/content-management/shortcodes#gist) Example `gist` input: @@ -80,7 +80,7 @@ The HTML looks like this: ## highlight -[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes/#instagram) +[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes#instagram) Example `highlight` input: @@ -112,7 +112,7 @@ The rendered output looks like this: ## instagram -[Documentation of `instagram`](https://gohugo.io/content-management/shortcodes/#instagram) +[Documentation of `instagram`](https://gohugo.io/content-management/shortcodes#instagram) Example `instagram` input: @@ -126,7 +126,7 @@ The rendered output looks like this: ## param -[Documentation of `param`](https://gohugo.io/content-management/shortcodes/#param) +[Documentation of `param`](https://gohugo.io/content-management/shortcodes#param) Example `param` input: @@ -140,11 +140,11 @@ The rendered output looks like this: ## ref and relref {#ref-and-relref} -[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes/#ref-and-relref) +[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes#ref-and-relref) ## tweet -[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes/#tweet) +[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes#tweet) Example `tweet` input: @@ -158,7 +158,7 @@ The rendered output looks like this: ## vimeo -[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes/#vimeo) +[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes#vimeo) Example `vimeo` input: @@ -172,7 +172,7 @@ The rendered output looks like this: ## youtube -[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes/#youtube) +[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes#youtube) Example `youtube` input: diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md index c67eaa4..85e21ff 100644 --- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md @@ -31,7 +31,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见 ## figure {#figure} -[`figure` 的文档](https://gohugo.io/content-management/shortcodes/#figure) +[`figure` 的文档](https://gohugo.io/content-management/shortcodes#figure) 一个 `figure` 示例: @@ -56,7 +56,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见 ## gist -[`gist` 的文档](https://gohugo.io/content-management/shortcodes/#gist) +[`gist` 的文档](https://gohugo.io/content-management/shortcodes#gist) 一个 `gist` 示例: @@ -76,7 +76,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见 ## highlight -[`highlight` 的文档](https://gohugo.io/content-management/shortcodes/#instagram) +[`highlight` 的文档](https://gohugo.io/content-management/shortcodes#instagram) 一个 `highlight` 示例: @@ -108,7 +108,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见 ## instagram -[`instagram` 的文档](https://gohugo.io/content-management/shortcodes/#instagram) +[`instagram` 的文档](https://gohugo.io/content-management/shortcodes#instagram) 一个 `instagram` 示例: @@ -122,7 +122,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见 ## param -[`param` 的文档](https://gohugo.io/content-management/shortcodes/#param) +[`param` 的文档](https://gohugo.io/content-management/shortcodes#param) 一个 `param` 示例: @@ -136,11 +136,11 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见 ## ref 和 relref {#ref-and-relref} -[`ref` 和 `relref` 的文档](https://gohugo.io/content-management/shortcodes/#ref-and-relref) +[`ref` 和 `relref` 的文档](https://gohugo.io/content-management/shortcodes#ref-and-relref) ## tweet -[`tweet` 的文档](https://gohugo.io/content-management/shortcodes/#tweet) +[`tweet` 的文档](https://gohugo.io/content-management/shortcodes#tweet) 一个 `tweet` 示例: @@ -154,7 +154,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见 ## vimeo -[`vimeo` 的文档](https://gohugo.io/content-management/shortcodes/#vimeo) +[`vimeo` 的文档](https://gohugo.io/content-management/shortcodes#vimeo) 一个 `vimeo` 示例: @@ -168,7 +168,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见 ## youtube -[`youtube` 的文档](https://gohugo.io/content-management/shortcodes/#youtube) +[`youtube` 的文档](https://gohugo.io/content-management/shortcodes#youtube) 一个 `youtube` 示例: diff --git a/exampleSite/content/posts/theme-documentation-content.en.md b/exampleSite/content/posts/theme-documentation-content.en.md index e8d3a26..f7373df 100644 --- a/exampleSite/content/posts/theme-documentation-content.en.md +++ b/exampleSite/content/posts/theme-documentation-content.en.md @@ -38,7 +38,7 @@ A few suggestions to help you get a good looking site quickly: {{< admonition >}} **Not all** of the below front matters need to be set in each of your posts. -It is necessary only if the front matters and the `page` part in your [site configuration](../theme-documentation-basics/#site-configuration) are inconsistent. +It is necessary only if the front matters and the `page` part in your [site configuration](../theme-documentation-basics#site-configuration) are inconsistent. {{< /admonition >}} Here is a front matter example: @@ -92,7 +92,7 @@ comment: * **title**: the title for the content. * **subtitle**: {{< version 0.2.0 >}} the subtitle for the content. -* **date**: the datetime assigned to this page, which is usually fetched from the `date` field in front matter, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics/#site-configuration). +* **date**: the datetime assigned to this page, which is usually fetched from the `date` field in front matter, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics#site-configuration). * **lastmod**: the datetime at which the content was last modified. * **draft**: if `true`, the content will not be rendered unless the `--buildDrafts`/`-D` flag is passed to the `hugo` command. * **author**: the author for the content. @@ -114,12 +114,12 @@ comment: * **fontawesome**: {{< version 0.2.0 >}} if `true`, the content will enable the [Font Awesome extended syntax](#fontawesome). * **linkToMarkdown**: if `true`, the footer of the content will show the link to the orignal Markdown file. -* **toc**: {{< version 0.2.0 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **code**: {{< version 0.2.0 >}} the same as the `params.page.code` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **share**: the same as the `params.page.share` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics/#site-configuration). +* **toc**: {{< version 0.2.0 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **code**: {{< version 0.2.0 >}} the same as the `params.page.code` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **share**: the same as the `params.page.share` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics#site-configuration). ## 3 Content Summaries @@ -131,9 +131,9 @@ comment: By default, Hugo automatically takes the first 70 words of your content as its summary. -You may customize the summary length by setting `summaryLength` in the [site configuration](../theme-documentation-basics/#site-configuration). +You may customize the summary length by setting `summaryLength` in the [site configuration](../theme-documentation-basics#site-configuration). -If you are creating content in a [CJK]^(Chinese/Japanese/Korean) language and want to use Hugo’s automatic summary splitting, set `hasCJKLanguage` to `true` in your [site configuration](../theme-documentation-basics/#site-configuration). +If you are creating content in a [CJK]^(Chinese/Japanese/Korean) language and want to use Hugo’s automatic summary splitting, set `hasCJKLanguage` to `true` in your [site configuration](../theme-documentation-basics#site-configuration). ### Manual Summary Splitting @@ -184,7 +184,7 @@ This part is shown in the [emoji support page](../emoji-support/). **LoveIt** theme supports mathematical formulas based on [$ \KaTeX $](https://katex.org/). -Set the property `enable = true` under `[params.math]` in your [site configuration](../theme-documentation-basics/#site-configuration) +Set the property `enable = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) and the property `math: true` of the article front matter to enable the automatic rendering of mathematical formulas. {{< admonition tip >}} @@ -220,7 +220,7 @@ The rendered output looks like this: $ c = \pm\sqrt{a^2 + b^2} $ and \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\) {{< admonition tip >}} -You can add more block and inline delimiters in your [site configuration](../theme-documentation-basics/#site-configuration). +You can add more block and inline delimiters in your [site configuration](../theme-documentation-basics#site-configuration). {{< /admonition >}} #### Copy-tex @@ -229,7 +229,7 @@ You can add more block and inline delimiters in your [site configuration](../the By the extension, when selecting and copying $ \KaTeX $ rendered elements, copies their $ \LaTeX $ source to the clipboard. -Set the property `copyTex = true` under `[params.math]` in your [site configuration](../theme-documentation-basics/#site-configuration) to enable Copy-tex. +Set the property `copyTex = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) to enable Copy-tex. Select and copy the formula rendered in the previous section, and you can find that the copied content is the LaTeX source code. @@ -239,7 +239,7 @@ Select and copy the formula rendered in the previous section, and you can find t By the extension, you can write beautiful chemical equations easily in the article. -Set the property `mhchem = true` under `[params.math]` in your [site configuration](../theme-documentation-basics/#site-configuration) to enable mhchem. +Set the property `mhchem = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) to enable mhchem. ```markdown $$ \ce{CO2 + C -> 2 CO} $$ diff --git a/exampleSite/content/posts/theme-documentation-content.fr.md b/exampleSite/content/posts/theme-documentation-content.fr.md index dab7916..bf2bdae 100644 --- a/exampleSite/content/posts/theme-documentation-content.fr.md +++ b/exampleSite/content/posts/theme-documentation-content.fr.md @@ -43,7 +43,7 @@ A few suggestions to help you get a good looking site quickly: {{< admonition >}} **Not all** of the below front matters need to be set in each of your posts. -It is necessary only if the front matters and the `page` part in your [site configuration](../theme-documentation-basics/#site-configuration) are inconsistent. +It is necessary only if the front matters and the `page` part in your [site configuration](../theme-documentation-basics#site-configuration) are inconsistent. {{< /admonition >}} Here is a front matter example: @@ -97,7 +97,7 @@ comment: * **title**: the title for the content. * **subtitle**: {{< version 0.2.0 >}} the subtitle for the content. -* **date**: the datetime assigned to this page, which is usually fetched from the `date` field in front matter, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics/#site-configuration). +* **date**: the datetime assigned to this page, which is usually fetched from the `date` field in front matter, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics#site-configuration). * **lastmod**: the datetime at which the content was last modified. * **draft**: if `true`, the content will not be rendered unless the `--buildDrafts`/`-D` flag is passed to the `hugo` command. * **author**: the author for the content. @@ -119,12 +119,12 @@ comment: * **fontawesome**: {{< version 0.2.0 >}} if `true`, the content will enable the [Font Awesome extended syntax](#fontawesome). * **linkToMarkdown**: if `true`, the footer of the content will show the link to the orignal Markdown file. -* **toc**: {{< version 0.2.0 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **code**: {{< version 0.2.0 >}} the same as the `params.page.code` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **share**: the same as the `params.page.share` part in the [site configuration](../theme-documentation-basics/#site-configuration). -* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics/#site-configuration). +* **toc**: {{< version 0.2.0 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **code**: {{< version 0.2.0 >}} the same as the `params.page.code` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **share**: the same as the `params.page.share` part in the [site configuration](../theme-documentation-basics#site-configuration). +* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics#site-configuration). ## 3 Content Summaries @@ -136,9 +136,9 @@ comment: By default, Hugo automatically takes the first 70 words of your content as its summary. -You may customize the summary length by setting `summaryLength` in the [site configuration](../theme-documentation-basics/#site-configuration). +You may customize the summary length by setting `summaryLength` in the [site configuration](../theme-documentation-basics#site-configuration). -If you are creating content in a [CJK]^(Chinese/Japanese/Korean) language and want to use Hugo’s automatic summary splitting, set `hasCJKLanguage` to `true` in your [site configuration](../theme-documentation-basics/#site-configuration). +If you are creating content in a [CJK]^(Chinese/Japanese/Korean) language and want to use Hugo’s automatic summary splitting, set `hasCJKLanguage` to `true` in your [site configuration](../theme-documentation-basics#site-configuration). ### Manual Summary Splitting @@ -189,7 +189,7 @@ This part is shown in the [emoji support page](../emoji-support/). **LoveIt** theme supports mathematical formulas based on [$ \KaTeX $](https://katex.org/). -Set the property `enable = true` under `[params.math]` in your [site configuration](../theme-documentation-basics/#site-configuration) +Set the property `enable = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) and the property `math: true` of the article front matter to enable the automatic rendering of mathematical formulas. {{< admonition tip >}} @@ -225,7 +225,7 @@ The rendered output looks like this: $ c = \pm\sqrt{a^2 + b^2} $ and \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\) {{< admonition tip >}} -You can add more block and inline delimiters in your [site configuration](../theme-documentation-basics/#site-configuration). +You can add more block and inline delimiters in your [site configuration](../theme-documentation-basics#site-configuration). {{< /admonition >}} #### Copy-tex @@ -234,7 +234,7 @@ You can add more block and inline delimiters in your [site configuration](../the By the extension, when selecting and copying $ \KaTeX $ rendered elements, copies their $ \LaTeX $ source to the clipboard. -Set the property `copyTex = true` under `[params.math]` in your [site configuration](../theme-documentation-basics/#site-configuration) to enable Copy-tex. +Set the property `copyTex = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) to enable Copy-tex. Select and copy the formula rendered in the previous section, and you can find that the copied content is the LaTeX source code. @@ -244,7 +244,7 @@ Select and copy the formula rendered in the previous section, and you can find t By the extension, you can write beautiful chemical equations easily in the article. -Set the property `mhchem = true` under `[params.math]` in your [site configuration](../theme-documentation-basics/#site-configuration) to enable mhchem. +Set the property `mhchem = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) to enable mhchem. ```markdown $$ \ce{CO2 + C -> 2 CO} $$ diff --git a/exampleSite/content/posts/theme-documentation-content.zh-cn.md b/exampleSite/content/posts/theme-documentation-content.zh-cn.md index 46e7134..9a6cd46 100644 --- a/exampleSite/content/posts/theme-documentation-content.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-content.zh-cn.md @@ -38,7 +38,7 @@ math: {{< admonition >}} **不是所有**的以下前置参数都必须在你的每篇文章中设置. -只有在文章的参数和你的 [网站设置](../theme-documentation-basics/#site-configuration) 中的 `page` 部分不一致时才有必要这么做. +只有在文章的参数和你的 [网站设置](../theme-documentation-basics#site-configuration) 中的 `page` 部分不一致时才有必要这么做. {{< /admonition >}} 这是一个前置参数例子: @@ -92,7 +92,7 @@ comment: * **title**: 文章标题. * **subtitle**: {{< version 0.2.0 >}} 文章副标题. -* **date**: 这篇文章创建的日期时间. 它通常是从文章的前置参数中的 `date` 字段获取的, 但是也可以在 [网站配置](../theme-documentation-basics/#site-configuration) 中设置. +* **date**: 这篇文章创建的日期时间. 它通常是从文章的前置参数中的 `date` 字段获取的, 但是也可以在 [网站配置](../theme-documentation-basics#site-configuration) 中设置. * **lastmod**: 上次修改内容的日期时间. * **draft**: 如果设为 `true`, 除非 `hugo` 命令使用了 `--buildDrafts`/`-D` 参数, 这篇文章不会被渲染. * **author**: 文章作者. @@ -114,12 +114,12 @@ comment: * **fontawesome**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [Font Awesome 扩展语法](#fontawesome). * **linkToMarkdown**: 如果设为 `true`, 内容的页脚将显示指向原始 Markdown 文件的链接. -* **toc**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `params.page.toc` 部分相同. -* **code**: {{< version 0.2.0 >}} 和 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `params.page.code` 部分相同. -* **math**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `params.page.math` 部分相同. -* **mapbox**: {{< version 0.2.0 >}} 和 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `params.page.mapbox` 部分相同. -* **share**: 和 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `params.page.share` 部分相同. -* **comment**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `params.page.comment` 部分相同. +* **toc**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.toc` 部分相同. +* **code**: {{< version 0.2.0 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.code` 部分相同. +* **math**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.math` 部分相同. +* **mapbox**: {{< version 0.2.0 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.mapbox` 部分相同. +* **share**: 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.share` 部分相同. +* **comment**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.comment` 部分相同. ## 3 内容摘要 @@ -131,9 +131,9 @@ comment: 默认情况下, Hugo 自动将内容的前 70 个单词作为摘要. -你可以通过在 [网站配置](../theme-documentation-basics/#site-configuration) 中设置 `summaryLength` 来自定义摘要长度. +你可以通过在 [网站配置](../theme-documentation-basics#site-configuration) 中设置 `summaryLength` 来自定义摘要长度. -如果您要使用 [CJK]^(中文/日语/韩语) 语言创建内容, 并且想使用 Hugo 的自动摘要拆分功能,请在 [网站配置](../theme-documentation-basics/#site-configuration) 中将 `hasCJKLanguage` 设置为 `true`. +如果您要使用 [CJK]^(中文/日语/韩语) 语言创建内容, 并且想使用 Hugo 的自动摘要拆分功能,请在 [网站配置](../theme-documentation-basics#site-configuration) 中将 `hasCJKLanguage` 设置为 `true`. ### 手动摘要拆分 @@ -184,7 +184,7 @@ comment: **LoveIt** 基于 [$ \KaTeX $](https://katex.org/) 提供数学公式的支持. -在你的 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `[params.math]` 下面设置属性 `enable = true`, +在你的 [网站配置](../theme-documentation-basics#site-configuration) 中的 `[params.math]` 下面设置属性 `enable = true`, 并在文章的前置参数中设置属性 `math: true`来启用数学公式的自动渲染. {{< admonition tip >}} @@ -220,7 +220,7 @@ $ c = \pm\sqrt{a^2 + b^2} $ 和 \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^ $ c = \pm\sqrt{a^2 + b^2} $ 和 \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\) {{< admonition tip >}} -你可以在 [网站配置](../theme-documentation-basics/#site-configuration) 中自定义公式块和行内公式的分割符. +你可以在 [网站配置](../theme-documentation-basics#site-configuration) 中自定义公式块和行内公式的分割符. {{< /admonition >}} #### Copy-tex @@ -229,7 +229,7 @@ $ c = \pm\sqrt{a^2 + b^2} $ 和 \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^ 通过这个扩展, 在选择并复制 $ \KaTeX $ 渲染的公式时, 会将其 $ \LaTeX $ 源代码复制到剪贴板. -在你的 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `[params.math]` 下面设置属性 `copyTex = true` 来启用 Copy-tex. +在你的 [网站配置](../theme-documentation-basics#site-configuration) 中的 `[params.math]` 下面设置属性 `copyTex = true` 来启用 Copy-tex. 选择并复制上一节中渲染的公式, 可以发现复制的内容为 LaTeX 源代码. @@ -239,7 +239,7 @@ $ c = \pm\sqrt{a^2 + b^2} $ 和 \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^ 通过这个扩展, 你可以在文章中轻松编写漂亮的化学方程式. -在你的 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `[params.math]` 下面设置属性 `mhchem = true` 来启用 mhchem. +在你的 [网站配置](../theme-documentation-basics#site-configuration) 中的 `[params.math]` 下面设置属性 `mhchem = true` 来启用 mhchem. ```markdown $$ \ce{CO2 + C -> 2 CO} $$ diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md index 932a40f..08927cf 100644 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md +++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md @@ -52,7 +52,7 @@ This is a **right-aligned** paragraph. {{< version 0.2.0 >}} -`link` shortcode is an alternative to [Markdown link syntax](../basic-markdown-syntax/#links). `link` shortcode can provide some other features and can be used in code blocks. +`link` shortcode is an alternative to [Markdown link syntax](../basic-markdown-syntax#links). `link` shortcode can provide some other features and can be used in code blocks. The `link` shortcode has the following named parameters: @@ -116,7 +116,7 @@ The rendered output looks like this (hover over the link, there should be a tool {{< version 0.2.0 changed >}} -`image` shortcode is an alternative to [`figure` shortcode](../theme-documentation-built-in-shortcodes/#figure). `image` shortcode can take full advantage of the dependent libraries of [lazysizes](https://github.com/aFarkas/lazysizes) and [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js). +`image` shortcode is an alternative to [`figure` shortcode](../theme-documentation-built-in-shortcodes#figure). `image` shortcode can take full advantage of the dependent libraries of [lazysizes](https://github.com/aFarkas/lazysizes) and [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js). The `image` shortcode has the following named parameters: @@ -246,25 +246,25 @@ The `admonition` shortcode has the following named parameters: Title of the `admonition` banner, default value is the value of **type** parameter. -* **details** *[optional]* (**third** positional parameter) +* **open** *[optional]* (**third** positional parameter) {{< version 0.2.0 changed >}} - Whether the content will be expandable/collapsible, default value is `false`. + Whether the content will be expandable by default, default value is `true`. Example `admonition` input: ```markdown -{{</* admonition type=tip title="This is a tip" details=true */>}} +{{</* admonition type=tip title="This is a tip" open=false */>}} A **tip** banner {{</* /admonition */>}} Or -{{</* admonition tip "This is a tip" true */>}} +{{</* admonition tip "This is a tip" false */>}} A **tip** banner {{</* /admonition */>}} ``` The rendered output looks like this: -{{< admonition tip "This is a tip" true >}} +{{< admonition tip "This is a tip" false >}} A **tip** banner {{< /admonition >}} @@ -930,27 +930,27 @@ The `mapbox` shortcode has the following named parameters to use Mapbox GL JS: * **light-style** *[optional]* (**fifth** positional parameter) - Style for the light theme, default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Style for the light theme, default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **dark-style** *[optional]* (**sixth** positional parameter) - Style for the dark theme, default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Style for the dark theme, default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **navigation** *[optional]* - Whether to add [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol), default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Whether to add [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **geolocate** *[optional]* - Whether to add [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol), default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Whether to add [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **scale** *[optional]* - Whether to add [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol), default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Whether to add [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **fullscreen** *[optional]* - Whether to add [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol), default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Whether to add [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **width** *[optional]* diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md index 3758584..1c39199 100644 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md +++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md @@ -57,7 +57,7 @@ This is a **right-aligned** paragraph. {{< version 0.2.0 >}} -`link` shortcode is an alternative to [Markdown link syntax](../basic-markdown-syntax/#links). `link` shortcode can provide some other features and can be used in code blocks. +`link` shortcode is an alternative to [Markdown link syntax](../basic-markdown-syntax#links). `link` shortcode can provide some other features and can be used in code blocks. The `link` shortcode has the following named parameters: @@ -121,7 +121,7 @@ The rendered output looks like this (hover over the link, there should be a tool {{< version 0.2.0 changed >}} -`image` shortcode is an alternative to [`figure` shortcode](../theme-documentation-built-in-shortcodes/#figure). `image` shortcode can take full advantage of the dependent libraries of [lazysizes](https://github.com/aFarkas/lazysizes) and [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js). +`image` shortcode is an alternative to [`figure` shortcode](../theme-documentation-built-in-shortcodes#figure). `image` shortcode can take full advantage of the dependent libraries of [lazysizes](https://github.com/aFarkas/lazysizes) and [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js). The `image` shortcode has the following named parameters: @@ -251,25 +251,25 @@ The `admonition` shortcode has the following named parameters: Title of the `admonition` banner, default value is the value of **type** parameter. -* **details** *[optional]* (**third** positional parameter) +* **open** *[optional]* (**third** positional parameter) {{< version 0.2.0 changed >}} - Whether the content will be expandable/collapsible, default value is `false`. + Whether the content will be expandable by default, default value is `true`. Example `admonition` input: ```markdown -{{</* admonition type=tip title="This is a tip" details=true */>}} +{{</* admonition type=tip title="This is a tip" open=false */>}} A **tip** banner {{</* /admonition */>}} Or -{{</* admonition tip "This is a tip" true */>}} +{{</* admonition tip "This is a tip" false */>}} A **tip** banner {{</* /admonition */>}} ``` The rendered output looks like this: -{{< admonition tip "This is a tip" true >}} +{{< admonition tip "This is a tip" false >}} A **tip** banner {{< /admonition >}} @@ -935,27 +935,27 @@ The `mapbox` shortcode has the following named parameters to use Mapbox GL JS: * **light-style** *[optional]* (**fifth** positional parameter) - Style for the light theme, default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Style for the light theme, default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **dark-style** *[optional]* (**sixth** positional parameter) - Style for the dark theme, default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Style for the dark theme, default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **navigation** *[optional]* - Whether to add [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol), default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Whether to add [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **geolocate** *[optional]* - Whether to add [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol), default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Whether to add [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **scale** *[optional]* - Whether to add [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol), default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Whether to add [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **fullscreen** *[optional]* - Whether to add [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol), default value is the value set in the [front matter](../theme-documentation-content/#front-matter) or the [site configuration](../theme-documentation-basics/#site-configuration). + Whether to add [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). * **width** *[optional]* diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md index 74e09a1..9590c57 100644 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md @@ -54,7 +54,7 @@ This is a **right-aligned** paragraph. {{< version 0.2.0 >}} -`link` shortcode 是 [Markdown 链接语法](../basic-markdown-syntax/#links) 的替代. +`link` shortcode 是 [Markdown 链接语法](../basic-markdown-syntax#links) 的替代. `link` shortcode 可以提供一些其它的功能并且可以在代码块中使用. `link` shortcode 有以下命名参数: @@ -119,7 +119,7 @@ This is a **right-aligned** paragraph. {{< version 0.2.0 changed >}} -`image` shortcode 是 [`figure` shortcode](../theme-documentation-built-in-shortcodes/#figure) 的替代. `image` shortcode 可以充分利用 [lazysizes](https://github.com/aFarkas/lazysizes) 和 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 两个依赖库. +`image` shortcode 是 [`figure` shortcode](../theme-documentation-built-in-shortcodes#figure) 的替代. `image` shortcode 可以充分利用 [lazysizes](https://github.com/aFarkas/lazysizes) 和 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 两个依赖库. `image` shortcode 有以下命名参数: @@ -249,25 +249,25 @@ This is a **right-aligned** paragraph. `admonition` 横幅的标题, 默认值是 **type** 参数的值. -* **details** *[可选]* (**第三个**位置参数) +* **open** *[可选]* (**第三个**位置参数) {{< version 0.2.0 changed >}} - 横幅内容是否可展开/可折叠, 默认值是 `false`. + 横幅内容是否默认展开, 默认值是 `true`. 一个 `admonition` 示例: ```markdown -{{</* admonition type=tip title="This is a tip" details=true */>}} +{{</* admonition type=tip title="This is a tip" open=false */>}} 一个 **技巧** 横幅 {{</* /admonition */>}} 或者 -{{</* admonition tip "This is a tip" true */>}} +{{</* admonition tip "This is a tip" false */>}} 一个 **技巧** 横幅 {{</* /admonition */>}} ``` 呈现的输出效果如下: -{{< admonition tip "This is a tip" true >}} +{{< admonition tip "This is a tip" false >}} 一个 **技巧** 横幅 {{< /admonition >}} @@ -933,27 +933,27 @@ data = [ * **light-style** *[可选]* (**第五个**位置参数) - 浅色主题的地图样式, 默认值是[前置参数](../theme-documentation-content/#front-matter)或者[网站配置](../theme-documentation-basics/#site-configuration)中设置的值. + 浅色主题的地图样式, 默认值是[前置参数](../theme-documentation-content#front-matter)或者[网站配置](../theme-documentation-basics#site-configuration)中设置的值. * **dark-style** *[可选]* (**第六个**位置参数) - 深色主题的地图样式, 默认值是[前置参数](../theme-documentation-content/#front-matter)或者[网站配置](../theme-documentation-basics/#site-configuration)中设置的值. + 深色主题的地图样式, 默认值是[前置参数](../theme-documentation-content#front-matter)或者[网站配置](../theme-documentation-basics#site-configuration)中设置的值. * **navigation** *[可选]* - 是否添加 [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol), 默认值是[前置参数](../theme-documentation-content/#front-matter)或者[网站配置](../theme-documentation-basics/#site-configuration)中设置的值. + 是否添加 [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol), 默认值是[前置参数](../theme-documentation-content#front-matter)或者[网站配置](../theme-documentation-basics#site-configuration)中设置的值. * **geolocate** *[可选]* - 是否添加 [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol), 默认值是[前置参数](../theme-documentation-content/#front-matter)或者[网站配置](../theme-documentation-basics/#site-configuration)中设置的值. + 是否添加 [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol), 默认值是[前置参数](../theme-documentation-content#front-matter)或者[网站配置](../theme-documentation-basics#site-configuration)中设置的值. * **scale** *[可选]* - 是否添加 [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol), 默认值是[前置参数](../theme-documentation-content/#front-matter)或者[网站配置](../theme-documentation-basics/#site-configuration)中设置的值. + 是否添加 [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol), 默认值是[前置参数](../theme-documentation-content#front-matter)或者[网站配置](../theme-documentation-basics#site-configuration)中设置的值. * **fullscreen** *[可选]* - 是否添加 [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol), 默认值是[前置参数](../theme-documentation-content/#front-matter)或者[网站配置](../theme-documentation-basics/#site-configuration)中设置的值. + 是否添加 [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol), 默认值是[前置参数](../theme-documentation-content#front-matter)或者[网站配置](../theme-documentation-basics#site-configuration)中设置的值. * **width** *[可选]* |