mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
docs: update zh-CN docs and fix some bugs
This commit is contained in:
parent
426e24598d
commit
fb9a9e7324
27 changed files with 159 additions and 227 deletions
|
@ -30,7 +30,7 @@ Compared to the original LeaveIt theme and the KeepIt theme, the LoveIt theme ha
|
|||
* Easy-to-use and self-expanding **table of contents**
|
||||
* Extended markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
|
||||
* Extended markdown syntax for **ruby annotation**
|
||||
* **Mathematical formula** support by [Katex](https://katex.org/)
|
||||
* **Mathematical formula** support by [KaTeX](https://katex.org/)
|
||||
* **Diagram syntax** shortcode support by [mermaid](https://github.com/knsv/mermaid)
|
||||
* **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
|
||||
* Embedded **music player** support by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
|
||||
|
@ -86,7 +86,7 @@ I hope you will LoveIt ❤️!
|
|||
* **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* Extended markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
|
||||
* Extended markdown syntax for **ruby annotation**
|
||||
* **Mathematical formula** supported by [Katex](https://katex.org/)
|
||||
* **Mathematical formula** supported by [KaTeX](https://katex.org/)
|
||||
* **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid)
|
||||
* **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
|
||||
* **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
|
||||
|
@ -123,7 +123,7 @@ Thanks to the authors of following resources included in the theme:
|
|||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
|
||||
* [TypeIt](https://typeitjs.com/)
|
||||
* [Katex](https://katex.org/)
|
||||
* [KaTeX](https://katex.org/)
|
||||
* [mermaid](https://github.com/knsv/mermaid)
|
||||
* [ECharts](https://echarts.apache.org/)
|
||||
* [APlayer](https://github.com/MoePlayer/APlayer)
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* 易用和自动展开的**文章目录**
|
||||
* 支持基于 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法
|
||||
* 支持**上标注释**的扩展 Markdown 语法
|
||||
* 支持基于 [Katex](https://katex.org/) 的**数学公式**
|
||||
* 支持基于 [KaTeX](https://katex.org/) 的**数学公式**
|
||||
* 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表**生成功能
|
||||
* 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化**生成功能
|
||||
* 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的内嵌**音乐播放器**
|
||||
|
@ -81,7 +81,7 @@
|
|||
* 支持基于 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 的**图片画廊**
|
||||
* 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法
|
||||
* 支持**上标注释**的扩展 Markdown 语法
|
||||
* 支持基于 [Katex](https://katex.org/) 的**数学公式**
|
||||
* 支持基于 [KaTeX](https://katex.org/) 的**数学公式**
|
||||
* 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode
|
||||
* 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode
|
||||
* 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode
|
||||
|
@ -118,7 +118,7 @@ LoveIt 主题中用到了以下项目,感谢它们的作者:
|
|||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
|
||||
* [TypeIt](https://typeitjs.com/)
|
||||
* [Katex](https://katex.org/)
|
||||
* [KaTeX](https://katex.org/)
|
||||
* [mermaid](https://github.com/knsv/mermaid)
|
||||
* [ECharts](https://echarts.apache.org/)
|
||||
* [APlayer](https://github.com/MoePlayer/APlayer)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
baseURL = "/"
|
||||
# [en, zh-CN, fr, ...] determines default content language
|
||||
# [en, zh-CN, fr, ...] 设置默认的语言
|
||||
# [en, zh-cn, fr, ...] determines default content language
|
||||
# [en, zh-cn, fr, ...] 设置默认的语言
|
||||
defaultContentLanguage = "en"
|
||||
# theme
|
||||
# 主题
|
||||
|
@ -237,9 +237,9 @@ enableEmoji = true
|
|||
appId = ""
|
||||
languageCode = "en_US"
|
||||
|
||||
[languages.zh-CN]
|
||||
[languages.zh-cn]
|
||||
weight = 2
|
||||
# 网站语言
|
||||
# 网站语言, 仅在这里 CN 大写
|
||||
languageCode = "zh-CN"
|
||||
# 网站标题
|
||||
title = "LoveIt 主题"
|
||||
|
@ -256,43 +256,43 @@ enableEmoji = true
|
|||
# 日期格式
|
||||
dateFormatToUse = "2006-01-02"
|
||||
# 菜单信息
|
||||
[languages.zh-CN.menu]
|
||||
[[languages.zh-CN.menu.main]]
|
||||
[languages.zh-cn.menu]
|
||||
[[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]]
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "documentation"
|
||||
pre = ""
|
||||
name = "主题文档"
|
||||
url = "/categories/documentation/"
|
||||
title = ""
|
||||
weight = 4
|
||||
[[languages.zh-CN.menu.main]]
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "关于"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 5
|
||||
[languages.zh-CN.params]
|
||||
[languages.zh-cn.params]
|
||||
# 网站描述
|
||||
description = "关于 LoveIt 主题"
|
||||
# 网站关键词
|
||||
|
@ -300,9 +300,9 @@ enableEmoji = true
|
|||
# 网站默认主题 ("light", "dark", "auto")
|
||||
defaultTheme = "auto"
|
||||
# 主页信息设置
|
||||
[languages.zh-CN.params.home]
|
||||
[languages.zh-cn.params.home]
|
||||
# 主页个人信息
|
||||
[languages.zh-CN.params.home.profile]
|
||||
[languages.zh-cn.params.home.profile]
|
||||
enable = true
|
||||
# Gravatar 邮箱,用于优先在主页显示的头像
|
||||
gravatarEmail = ""
|
||||
|
@ -315,14 +315,14 @@ enableEmoji = true
|
|||
# 是否显示社交账号
|
||||
social = true
|
||||
# 主页文章列表
|
||||
[languages.zh-CN.params.home.posts]
|
||||
[languages.zh-cn.params.home.posts]
|
||||
enable = true
|
||||
# 主页每页显示文章数量
|
||||
paginate = 6
|
||||
# 当你没有在文章前面设置 "hiddenFromHomePage" 时的默认行为
|
||||
defaultHiddenFromHomePage = false
|
||||
# 主页的社交信息设置
|
||||
[languages.zh-CN.params.social]
|
||||
[languages.zh-cn.params.social]
|
||||
GitHub = "xxxx"
|
||||
# Linkedin = "xxxx"
|
||||
Twitter = "xxxx"
|
||||
|
@ -388,7 +388,7 @@ enableEmoji = true
|
|||
# Matrix = "xxxx"
|
||||
Bilibili = "xxxx"
|
||||
# 文章页面的分享信息设置
|
||||
[languages.zh-CN.params.share]
|
||||
[languages.zh-cn.params.share]
|
||||
enable = true
|
||||
Twitter = true
|
||||
Facebook = true
|
||||
|
@ -418,20 +418,20 @@ enableEmoji = true
|
|||
# Trello = true
|
||||
# Mix = true
|
||||
# 评论系统设置
|
||||
[languages.zh-CN.params.comment]
|
||||
[languages.zh-cn.params.comment]
|
||||
enable = true
|
||||
# Disqus 评论系统设置 (https://disqus.com/)
|
||||
[languages.zh-CN.params.comment.disqus]
|
||||
[languages.zh-cn.params.comment.disqus]
|
||||
# Disqus 的用户名,用来在文章中启用 Disqus 评论系统
|
||||
shortname = ""
|
||||
# Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||
[languages.zh-CN.params.comment.gitalk]
|
||||
[languages.zh-cn.params.comment.gitalk]
|
||||
owner = ""
|
||||
repo = ""
|
||||
clientId = ""
|
||||
clientSecret = ""
|
||||
# Valine 评论系统设置 (https://github.com/xCss/Valine)
|
||||
[languages.zh-CN.params.comment.valine]
|
||||
[languages.zh-cn.params.comment.valine]
|
||||
enable = false
|
||||
appId = ""
|
||||
appKey = ""
|
||||
|
@ -445,7 +445,7 @@ enableEmoji = true
|
|||
visitor = true
|
||||
recordIP = true
|
||||
# Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments)
|
||||
[languages.zh-CN.params.comment.facebook]
|
||||
[languages.zh-cn.params.comment.facebook]
|
||||
enable = false
|
||||
width = "100%"
|
||||
numPosts = 10
|
||||
|
|
|
@ -3,6 +3,7 @@ title: "About LoveIt"
|
|||
date: 2019-08-02T11:04:49+08:00
|
||||
draft: false
|
||||
|
||||
math: true
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
|
@ -52,7 +53,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a
|
|||
* :(far fa-images): **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* :(fab fa-font-awesome): Extended markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
|
||||
* :(far fa-sticky-note): Extended markdown syntax for **ruby annotation**
|
||||
* :(fas fa-square-root-alt): **Mathematical formula** supported by [Katex](https://katex.org/)
|
||||
* :(fas fa-square-root-alt): **Mathematical formula** supported by [$ \KaTeX $](https://katex.org/)
|
||||
* :(fas fa-project-diagram): **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid)
|
||||
* :(fas fa-chart-pie): **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
|
||||
* :(fas fa-music): **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
|
||||
|
@ -78,7 +79,7 @@ Thanks to the authors of following resources included in the theme:
|
|||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
|
||||
* [TypeIt](https://typeitjs.com/)
|
||||
* [Katex](https://katex.org/)
|
||||
* [$ \KaTeX $](https://katex.org/)
|
||||
* [mermaid](https://github.com/knsv/mermaid)
|
||||
* [ECharts](https://echarts.apache.org/)
|
||||
* [APlayer](https://github.com/MoePlayer/APlayer)
|
||||
|
|
|
@ -3,6 +3,7 @@ title: "À propos de LoveIt"
|
|||
date: 2019-08-02T11:04:49+08:00
|
||||
draft: false
|
||||
|
||||
math: true
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
|
@ -57,7 +58,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a
|
|||
* :(far fa-images): **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* :(fab fa-font-awesome): Extended markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
|
||||
* :(far fa-sticky-note): Extended markdown syntax for **ruby annotation**
|
||||
* :(fas fa-square-root-alt): **Mathematical formula** supported by [Katex](https://katex.org/)
|
||||
* :(fas fa-square-root-alt): **Mathematical formula** supported by [$ \KaTeX $](https://katex.org/)
|
||||
* :(fas fa-project-diagram): **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid)
|
||||
* :(fas fa-chart-pie): **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
|
||||
* :(fas fa-music): **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
|
||||
|
@ -83,7 +84,7 @@ Thanks to the authors of following resources included in the theme:
|
|||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
|
||||
* [TypeIt](https://typeitjs.com/)
|
||||
* [Katex](https://katex.org/)
|
||||
* [$ \KaTeX $](https://katex.org/)
|
||||
* [mermaid](https://github.com/knsv/mermaid)
|
||||
* [ECharts](https://echarts.apache.org/)
|
||||
* [APlayer](https://github.com/MoePlayer/APlayer)
|
||||
|
|
|
@ -3,6 +3,7 @@ title: "关于 LoveIt"
|
|||
date: 2019-08-02T11:04:49+08:00
|
||||
draft: false
|
||||
|
||||
math: true
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
|
@ -52,7 +53,7 @@ lightgallery: true
|
|||
* :(far fa-images): 支持基于 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 的**图片画廊**
|
||||
* :(fab fa-font-awesome): 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法
|
||||
* :(far fa-sticky-note): 支持**上标注释**的扩展 Markdown 语法
|
||||
* :(fas fa-square-root-alt): 支持基于 [Katex](https://katex.org/) 的**数学公式**
|
||||
* :(fas fa-square-root-alt): 支持基于 [$ \KaTeX $](https://katex.org/) 的**数学公式**
|
||||
* :(fas fa-project-diagram): 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode
|
||||
* :(fas fa-chart-pie): 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode
|
||||
* :(fas fa-music): 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode
|
||||
|
@ -78,7 +79,7 @@ LoveIt 主题中用到了以下项目,感谢它们的作者:
|
|||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
|
||||
* [TypeIt](https://typeitjs.com/)
|
||||
* [Katex](https://katex.org/)
|
||||
* [$ \KaTeX $](https://katex.org/)
|
||||
* [mermaid](https://github.com/knsv/mermaid)
|
||||
* [ECharts](https://echarts.apache.org/)
|
||||
* [APlayer](https://github.com/MoePlayer/APlayer)
|
||||
|
|
|
@ -618,7 +618,7 @@ The HTML looks like this:
|
|||
</table>
|
||||
```
|
||||
|
||||
{{< admonition "Right or center aligned text" >}}
|
||||
{{< admonition note "Right or center aligned text" >}}
|
||||
Adding a colon on the right side of the dashes below any heading will right align text for that column.
|
||||
|
||||
Adding colons on both sides of the dashes below any heading will center align text for that column.
|
||||
|
|
|
@ -623,7 +623,7 @@ The HTML looks like this:
|
|||
</table>
|
||||
```
|
||||
|
||||
{{< admonition "Right or center aligned text" >}}
|
||||
{{< admonition note "Right or center aligned text" >}}
|
||||
Adding a colon on the right side of the dashes below any heading will right align text for that column.
|
||||
|
||||
Adding colons on both sides of the dashes below any heading will center align text for that column.
|
||||
|
|
|
@ -620,7 +620,7 @@ grunt.initConfig({
|
|||
</table>
|
||||
```
|
||||
|
||||
{{< admonition "文本右对齐或居中对齐" >}}
|
||||
{{< admonition note "文本右对齐或居中对齐" >}}
|
||||
在任何标题下方的破折号右侧添加冒号将使该列的文本右对齐.
|
||||
|
||||
在任何标题下方的破折号两边添加冒号将使该列的对齐文本居中.
|
||||
|
|
|
@ -78,6 +78,8 @@ The following is a basic configuration for the LoveIt theme:
|
|||
|
||||
```toml
|
||||
baseURL = "http://example.org/"
|
||||
# [en, zh-cn, fr, ...] determines default content language
|
||||
defaultContentLanguage = "en"
|
||||
# language code
|
||||
languageCode = "en"
|
||||
title = "My New Hugo Site"
|
||||
|
@ -113,13 +115,6 @@ theme = "LoveIt"
|
|||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
[[menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "About"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 4
|
||||
```
|
||||
|
||||
{{< admonition >}}
|
||||
|
@ -186,7 +181,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||
# LoveIt theme version
|
||||
version = "0.1.X"
|
||||
# site description
|
||||
description = "About LoveIt Theme"
|
||||
description = "This is My New Hugo Site"
|
||||
# site keywords
|
||||
keywords = ["Theme", "Hugo"]
|
||||
# site default theme ("light", "dark", "auto")
|
||||
|
@ -220,7 +215,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||
# URL of avatar shown in home page
|
||||
avatarURL = "/images/avatar.png"
|
||||
# subtitle shown in home page
|
||||
subtitle = "This is my new hugo site"
|
||||
subtitle = "This is My New Hugo Site"
|
||||
# whether to use typeit animation for subtitle
|
||||
typeit = true
|
||||
# whether to show social links
|
||||
|
@ -354,7 +349,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||
# Disqus Comment Config (https://disqus.com/)
|
||||
[params.comment.disqus]
|
||||
# Disqus shortname to use Disqus in posts
|
||||
shortname = "dillonzq"
|
||||
shortname = ""
|
||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
[params.comment.gitalk]
|
||||
owner = ""
|
||||
|
@ -523,7 +518,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||
taxonomyTerm = ["HTML"]
|
||||
```
|
||||
|
||||
![Complete configuration preview](/images/theme-documentation-basics/complete-configuration-preview.gif "Complete configuration preview")
|
||||
![Complete configuration preview](/images/theme-documentation-basics/complete-configuration-preview.png "Complete configuration preview")
|
||||
|
||||
### 3.2 Favicons, Browserconfig, Manifest
|
||||
|
||||
|
@ -579,7 +574,7 @@ After learning [how Hugo handle multilingual websites](https://gohugo.io/content
|
|||
For example with English, Chinese and French website:
|
||||
|
||||
```toml
|
||||
# [en, zh-CN, fr, ...] determines default content language
|
||||
# [en, zh-cn, fr, ...] determines default content language
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
[languages]
|
||||
|
@ -609,49 +604,36 @@ defaultContentLanguage = "en"
|
|||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "About"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
||||
[languages.zh-CN]
|
||||
[languages.zh-cn]
|
||||
weight = 2
|
||||
title = "我的全新 Hugo 网站"
|
||||
# language code, CN only here
|
||||
languageCode = "zh-CN"
|
||||
languageName = "简体中文"
|
||||
# whether to include Chinese/Japanese/Korean
|
||||
hasCJKLanguage = true
|
||||
[[languages.zh-CN.menu.main]]
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "posts"
|
||||
pre = ""
|
||||
name = "文章"
|
||||
url = "/posts/"
|
||||
title = ""
|
||||
weight = 1
|
||||
[[languages.zh-CN.menu.main]]
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "tags"
|
||||
pre = ""
|
||||
name = "标签"
|
||||
url = "/tags/"
|
||||
title = ""
|
||||
weight = 2
|
||||
[[languages.zh-CN.menu.main]]
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "categories"
|
||||
pre = ""
|
||||
name = "分类"
|
||||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
[[languages.zh-CN.menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "关于"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
||||
[languages.fr]
|
||||
weight = 3
|
||||
|
@ -679,13 +661,6 @@ defaultContentLanguage = "en"
|
|||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
[[languages.fr.menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "À propos"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 4
|
||||
```
|
||||
|
||||
Then, for each new page, append the language code to the file name.
|
||||
|
|
|
@ -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"]
|
||||
```
|
||||
|
||||
![Complete configuration preview](/images/theme-documentation-basics/complete-configuration-preview.gif "Complete configuration preview")
|
||||
![Complete configuration preview](/images/theme-documentation-basics/complete-configuration-preview.png "Complete configuration preview")
|
||||
|
||||
### 3.2 Favicons, Browserconfig, Manifest
|
||||
|
||||
|
@ -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.
|
||||
|
|
|
@ -78,9 +78,14 @@ git submodule -b master add https://github.com/dillonzq/LoveIt.git themes/LoveIt
|
|||
|
||||
```toml
|
||||
baseURL = "http://example.org/"
|
||||
# 语言代码
|
||||
languageCode = "en"
|
||||
title = "My New Hugo Site"
|
||||
# [en, zh-cn, fr, ...] 设置默认的语言
|
||||
defaultContentLanguage = "zh-cn"
|
||||
# 网站语言, 仅在这里 CN 大写
|
||||
languageCode = "zh-CN"
|
||||
# 是否包括中日韩文字
|
||||
hasCJKLanguage = true
|
||||
# 网站标题
|
||||
title = "我的全新 Hugo 网站"
|
||||
|
||||
# 更改使用 Hugo 构建网站时使用的默认主题
|
||||
theme = "LoveIt"
|
||||
|
@ -94,7 +99,7 @@ theme = "LoveIt"
|
|||
identifier = "posts"
|
||||
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
|
||||
pre = ""
|
||||
name = "Posts"
|
||||
name = "文章"
|
||||
url = "/posts/"
|
||||
# 当你将鼠标悬停在此菜单链接上时, 将显示的标题
|
||||
title = ""
|
||||
|
@ -102,24 +107,17 @@ theme = "LoveIt"
|
|||
[[menu.main]]
|
||||
identifier = "tags"
|
||||
pre = ""
|
||||
name = "Tags"
|
||||
name = "标签"
|
||||
url = "/tags/"
|
||||
title = ""
|
||||
weight = 2
|
||||
[[menu.main]]
|
||||
identifier = "categories"
|
||||
pre = ""
|
||||
name = "Categories"
|
||||
name = "分类"
|
||||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
[[menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "About"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 4
|
||||
```
|
||||
|
||||
{{< admonition >}}
|
||||
|
@ -150,7 +148,7 @@ hugo serve
|
|||
|
||||
去查看 `http://localhost:1313`.
|
||||
|
||||
![基本配置下的预览](/images/theme-documentation-basics/basic-configuration-preview.png "基本配置下的预览")
|
||||
![基本配置下的预览](/images/theme-documentation-basics/basic-configuration-preview.zh-cn.png "基本配置下的预览")
|
||||
|
||||
{{< admonition tip >}}
|
||||
当你运行 `hugo serve` 时, 当文件内容更改时, 页面会随着更改自动刷新.
|
||||
|
@ -186,7 +184,7 @@ hugo
|
|||
# LoveIt 主题版本
|
||||
version = "0.1.X"
|
||||
# 网站描述
|
||||
description = "About LoveIt Theme"
|
||||
description = "这是我的全新 Hugo 网站"
|
||||
# 网站关键词
|
||||
keywords = ["Theme", "Hugo"]
|
||||
# 网站默认主题样式 ("light", "dark", "auto")
|
||||
|
@ -220,7 +218,7 @@ hugo
|
|||
# 主页显示头像的 URL
|
||||
avatarURL = "/images/avatar.png"
|
||||
# 主页显示的网站副标题
|
||||
subtitle = "This is my new hugo site"
|
||||
subtitle = "这是我的全新 Hugo 网站"
|
||||
# 是否为副标题显示打字机动画
|
||||
typeit = true
|
||||
# 是否显示社交账号
|
||||
|
@ -235,15 +233,15 @@ hugo
|
|||
# 主页的社交信息设置
|
||||
[params.social]
|
||||
GitHub = "xxxx"
|
||||
Linkedin = "xxxx"
|
||||
Twitter = "xxxx"
|
||||
Instagram = "xxxx"
|
||||
# Linkedin = "xxxx"
|
||||
# Twitter = "xxxx"
|
||||
# Instagram = "xxxx"
|
||||
Email = "xxxx@xxxx.com"
|
||||
Facebook = "xxxx"
|
||||
Telegram = "xxxx"
|
||||
# Facebook = "xxxx"
|
||||
# Telegram = "xxxx"
|
||||
# Medium = "xxxx"
|
||||
# Gitlab = "xxxx"
|
||||
Youtubelegacy = "xxxx"
|
||||
# Youtubelegacy = "xxxx"
|
||||
# Youtubecustom = "xxxx"
|
||||
# Youtubechannel = "xxxx"
|
||||
# Tumblr ="xxxx"
|
||||
|
@ -255,7 +253,7 @@ hugo
|
|||
# FreeCodeCamp = "xxxx"
|
||||
# Bitbucket = "xxxx"
|
||||
# Stackoverflow = "xxxx"
|
||||
# Weibo = "xxxx"
|
||||
Weibo = "xxxx"
|
||||
# Odnoklassniki = "xxxx"
|
||||
# VK = "xxxx"
|
||||
# Flickr = "xxxx"
|
||||
|
@ -278,8 +276,8 @@ hugo
|
|||
# Strava = "xxxx"
|
||||
# Skype = "xxxx"
|
||||
# Whatsapp = "xxxx"
|
||||
# Zhihu = "xxxx"
|
||||
# Douban = "xxxx"
|
||||
Zhihu = "xxxx"
|
||||
Douban = "xxxx"
|
||||
# Angellist = "xxxx"
|
||||
# Slidershare = "xxxx"
|
||||
# Jsfiddle = "xxxx"
|
||||
|
@ -297,8 +295,7 @@ hugo
|
|||
# Gitea = "xxxx"
|
||||
# XMPP = "xxxx"
|
||||
# Matrix = "xxxx"
|
||||
# Bilibili = "xxxx"
|
||||
|
||||
Bilibili = "xxxx"
|
||||
# 文章页面配置
|
||||
[params.page]
|
||||
# 是否在文章页面使用 lightgallery
|
||||
|
@ -323,11 +320,11 @@ hugo
|
|||
enable = true
|
||||
Twitter = true
|
||||
Facebook = true
|
||||
Linkedin = true
|
||||
Whatsapp = true
|
||||
Pinterest = true
|
||||
# Linkedin = true
|
||||
# Whatsapp = true
|
||||
# Pinterest = true
|
||||
# Tumblr = true
|
||||
HackerNews = true
|
||||
# HackerNews = true
|
||||
# Reddit = true
|
||||
# VK = true
|
||||
# Buffer = true
|
||||
|
@ -338,13 +335,13 @@ hugo
|
|||
# Digg = true
|
||||
# Stumbleupon = true
|
||||
# Flipboard = true
|
||||
# Weibo = true
|
||||
Weibo = true
|
||||
# Renren = true
|
||||
# Myspace = true
|
||||
# Blogger = true
|
||||
# Baidu = true
|
||||
# Odnoklassniki = true
|
||||
# Evernote = true
|
||||
Evernote = true
|
||||
# Skype = true
|
||||
# Trello = true
|
||||
# Mix = true
|
||||
|
@ -354,7 +351,7 @@ hugo
|
|||
# Disqus 评论系统设置 (https://disqus.com/)
|
||||
[params.comment.disqus]
|
||||
# Disqus 的用户名,用来在文章中启用 Disqus 评论系统
|
||||
shortname = "dillonzq"
|
||||
shortname = ""
|
||||
# Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||
[params.comment.gitalk]
|
||||
owner = ""
|
||||
|
@ -523,7 +520,7 @@ hugo
|
|||
taxonomyTerm = ["HTML"]
|
||||
```
|
||||
|
||||
![完整配置下的预览](/images/theme-documentation-basics/complete-configuration-preview.gif "完整配置下的预览")
|
||||
![完整配置下的预览](/images/theme-documentation-basics/complete-configuration-preview.zh-cn.png "完整配置下的预览")
|
||||
|
||||
### 3.2 网站图标, 浏览器配置, 网站清单
|
||||
|
||||
|
@ -579,8 +576,8 @@ $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospac
|
|||
例如, 一个支持英语, 中文和法语的网站配置:
|
||||
|
||||
```toml
|
||||
# [en, zh-CN, fr, ...] 设置默认的语言
|
||||
defaultContentLanguage = "en"
|
||||
# [en, zh-cn, fr, ...] 设置默认的语言
|
||||
defaultContentLanguage = "zh-cn"
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
|
@ -609,49 +606,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 网站"
|
||||
# 网站语言, 仅在这里 CN 大写
|
||||
languageCode = "zh-CN"
|
||||
languageName = "简体中文"
|
||||
# 是否包括中日韩文字
|
||||
hasCJKLanguage = true
|
||||
[[languages.zh-CN.menu.main]]
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "posts"
|
||||
pre = ""
|
||||
name = "文章"
|
||||
url = "/posts/"
|
||||
title = ""
|
||||
weight = 1
|
||||
[[languages.zh-CN.menu.main]]
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "tags"
|
||||
pre = ""
|
||||
name = "标签"
|
||||
url = "/tags/"
|
||||
title = ""
|
||||
weight = 2
|
||||
[[languages.zh-CN.menu.main]]
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "categories"
|
||||
pre = ""
|
||||
name = "分类"
|
||||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
[[languages.zh-CN.menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "关于"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
||||
[languages.fr]
|
||||
weight = 3
|
||||
|
@ -679,13 +663,6 @@ defaultContentLanguage = "en"
|
|||
url = "/categories/"
|
||||
title = ""
|
||||
weight = 3
|
||||
[[languages.fr.menu.main]]
|
||||
identifier = "about"
|
||||
pre = ""
|
||||
name = "À propos"
|
||||
url = "/about/"
|
||||
title = ""
|
||||
weight = 4
|
||||
```
|
||||
|
||||
然后, 对于每个新页面, 将语言代码附加到文件名中.
|
||||
|
|
|
@ -155,13 +155,13 @@ This part is shown in the [emoji support page](../emoji-support/).
|
|||
|
||||
### Mathematical Formula
|
||||
|
||||
**LoveIt** theme supports mathematical formulas based on [KaTeX](https://katex.org/).
|
||||
**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)
|
||||
and the property `math: true` of the article front matter to enable the automatic rendering of mathematical formulas.
|
||||
|
||||
{{< admonition tip >}}
|
||||
Here is a list of [TeX functions supported by KaTeX](https://katex.org/docs/supported.html).
|
||||
Here is a list of [$ \TeX $ functions supported by $ \KaTeX $](https://katex.org/docs/supported.html).
|
||||
{{< /admonition >}}
|
||||
|
||||
#### Block Formula
|
||||
|
@ -198,9 +198,9 @@ You can add more block and inline delimiters in your [site configuration](../the
|
|||
|
||||
#### Copy-tex
|
||||
|
||||
**[Copy-tex](https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex)** is an extension for **KaTex**.
|
||||
**[Copy-tex](https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex)** is an extension for **$ \KaTeX $**.
|
||||
|
||||
By the extension, when selecting and copying KaTeX-rendered elements, copies their LaTeX source to the clipboard.
|
||||
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.
|
||||
|
||||
|
@ -208,7 +208,7 @@ Select and copy the formula rendered in the previous section, and you can find t
|
|||
|
||||
#### mhchem
|
||||
|
||||
**[mhchem](https://github.com/Khan/KaTeX/tree/master/contrib/mhchem)** is an extension for **KaTex**.
|
||||
**[mhchem](https://github.com/Khan/KaTeX/tree/master/contrib/mhchem)** is an extension for **$ \KaTeX $**.
|
||||
|
||||
By the extension, you can write beautiful chemical equations easily in the article.
|
||||
|
||||
|
|
|
@ -160,13 +160,13 @@ This part is shown in the [emoji support page](../emoji-support/).
|
|||
|
||||
### Mathematical Formula
|
||||
|
||||
**LoveIt** theme supports mathematical formulas based on [KaTeX](https://katex.org/).
|
||||
**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)
|
||||
and the property `math: true` of the article front matter to enable the automatic rendering of mathematical formulas.
|
||||
|
||||
{{< admonition tip >}}
|
||||
Here is a list of [TeX functions supported by KaTeX](https://katex.org/docs/supported.html).
|
||||
Here is a list of [$ \TeX $ functions supported by $ \KaTeX $](https://katex.org/docs/supported.html).
|
||||
{{< /admonition >}}
|
||||
|
||||
#### Block Formula
|
||||
|
@ -203,9 +203,9 @@ You can add more block and inline delimiters in your [site configuration](../the
|
|||
|
||||
#### Copy-tex
|
||||
|
||||
**[Copy-tex](https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex)** is an extension for **KaTex**.
|
||||
**[Copy-tex](https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex)** is an extension for **$ \KaTeX $**.
|
||||
|
||||
By the extension, when selecting and copying KaTeX-rendered elements, copies their LaTeX source to the clipboard.
|
||||
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.
|
||||
|
||||
|
@ -213,7 +213,7 @@ Select and copy the formula rendered in the previous section, and you can find t
|
|||
|
||||
#### mhchem
|
||||
|
||||
**[mhchem](https://github.com/Khan/KaTeX/tree/master/contrib/mhchem)** is an extension for **KaTex**.
|
||||
**[mhchem](https://github.com/Khan/KaTeX/tree/master/contrib/mhchem)** is an extension for **$ \KaTeX $**.
|
||||
|
||||
By the extension, you can write beautiful chemical equations easily in the article.
|
||||
|
||||
|
|
|
@ -155,13 +155,13 @@ comment: true
|
|||
|
||||
### 数学公式
|
||||
|
||||
**LoveIt** 基于 [KaTeX](https://katex.org/) 提供数学公式的支持.
|
||||
**LoveIt** 基于 [$ \KaTeX $](https://katex.org/) 提供数学公式的支持.
|
||||
|
||||
在你的 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `[params.math]` 下面设置属性 `enable = true`,
|
||||
并在文章的前置参数中设置属性 `math: true`来启用数学公式的自动渲染.
|
||||
|
||||
{{< admonition tip >}}
|
||||
有一份 [KaTeX 中支持的 TeX 函数](https://katex.org/docs/supported.html) 清单.
|
||||
有一份 [$ \KaTeX $ 中支持的 $ \TeX $ 函数](https://katex.org/docs/supported.html) 清单.
|
||||
{{< /admonition >}}
|
||||
|
||||
#### 公式块
|
||||
|
@ -185,12 +185,12 @@ $$ c = \pm\sqrt{a^2 + b^2} $$
|
|||
默认的行内公式分割符是 `$`/`$` 和 `\\(`/`\\)`:
|
||||
|
||||
```markdown
|
||||
$ c = \pm\sqrt{a^2 + b^2} $ and \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\)
|
||||
$ c = \pm\sqrt{a^2 + b^2} $ 和 \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\)
|
||||
```
|
||||
|
||||
呈现的输出效果如下:
|
||||
|
||||
$ c = \pm\sqrt{a^2 + b^2} $ and \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\)
|
||||
$ 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) 中自定义公式块和行内公式的分割符.
|
||||
|
@ -198,9 +198,9 @@ $ c = \pm\sqrt{a^2 + b^2} $ and \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^
|
|||
|
||||
#### Copy-tex
|
||||
|
||||
**[Copy-tex](https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex)** 是一个 **KaTex** 的插件.
|
||||
**[Copy-tex](https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex)** 是一个 **$ \KaTeX $** 的插件.
|
||||
|
||||
通过这个扩展, 在选择并复制 KaTeX 渲染的公式时, 会将其 LaTeX 源代码复制到剪贴板.
|
||||
通过这个扩展, 在选择并复制 $ \KaTeX $ 渲染的公式时, 会将其 $ \LaTeX $ 源代码复制到剪贴板.
|
||||
|
||||
在你的 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `[params.math]` 下面设置属性 `copyTex = true` 来启用 Copy-tex.
|
||||
|
||||
|
@ -208,7 +208,7 @@ $ c = \pm\sqrt{a^2 + b^2} $ and \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^
|
|||
|
||||
#### mhchem
|
||||
|
||||
**[mhchem](https://github.com/Khan/KaTeX/tree/master/contrib/mhchem)** 是一个 **KaTex** 的插件.
|
||||
**[mhchem](https://github.com/Khan/KaTeX/tree/master/contrib/mhchem)** 是一个 **$ \KaTeX $** 的插件.
|
||||
|
||||
通过这个扩展, 你可以在文章中轻松编写漂亮的化学方程式.
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 428 KiB After Width: | Height: | Size: 414 KiB |
Binary file not shown.
After Width: | Height: | Size: 432 KiB |
Binary file not shown.
Before Width: | Height: | Size: 397 KiB |
Binary file not shown.
After Width: | Height: | Size: 468 KiB |
Binary file not shown.
After Width: | Height: | Size: 502 KiB |
|
@ -19,9 +19,8 @@
|
|||
{{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
|
||||
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
|
||||
<span class="post-author">
|
||||
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||
</a>
|
||||
{{- $link := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
|
||||
{{- partial "plugin/link.html" $link -}}
|
||||
</span>
|
||||
|
||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
|
|
|
@ -222,7 +222,7 @@
|
|||
{{- else if not (strings.HasSuffix . ".min.css") -}}
|
||||
{{- $res = minify $res -}}
|
||||
{{- end -}}
|
||||
{{- $stylesheet := (dict "resource" $res "fingerprint" ($scratch.Get "fingerprint")) -}}
|
||||
{{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}}
|
||||
{{- partial "plugin/stylesheet.html" $stylesheet -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -234,7 +234,7 @@
|
|||
{{- if not (strings.HasSuffix . ".min.js") -}}
|
||||
{{- $res = minify $res -}}
|
||||
{{- end -}}
|
||||
{{- $script := (dict "resource" $res "fingerprint" ($scratch.Get "fingerprint")) -}}
|
||||
{{- $script := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}}
|
||||
{{- partial "plugin/script.html" $script -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
{{- . | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "lib/fontawesome-free/all.min.css" -}}
|
||||
{{- $stylesheet := (dict "resource" $res "fingerprint" ($scratch.Get "fingerprint")) -}}
|
||||
{{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}}
|
||||
{{- partial "plugin/stylesheet.html" $stylesheet -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
|||
{{- . | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "lib/fontawesome-free/all.min.css" -}}
|
||||
{{- $stylesheet := (dict "resource" $res "fingerprint" ($scratch.Get "fingerprint")) -}}
|
||||
{{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}}
|
||||
{{- partial "plugin/stylesheet.html" $stylesheet -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -46,5 +46,5 @@
|
|||
{{- $options = dict "outputStyle" "compressed" | merge $options -}}
|
||||
{{- $options = dict "enableSourceMap" true | merge $options -}}
|
||||
{{- $res = resources.ExecuteAsTemplate "style.scss" . $res | toCSS $options -}}
|
||||
{{- $stylesheet := (dict "resource" $res "fingerprint" ($scratch.Get "fingerprint")) -}}
|
||||
{{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}}
|
||||
{{- partial "plugin/stylesheet.html" $stylesheet -}}
|
||||
|
|
|
@ -15,21 +15,23 @@
|
|||
{{- if .Site.IsMultiLingual -}}
|
||||
|
|
||||
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<select class="language-select" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
{{- range $.Site.Languages -}}
|
||||
{{- if eq $translation.Lang .Lang -}}
|
||||
{{- if eq $.Page.Lang .Lang -}}
|
||||
<option value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}</option>
|
||||
{{- else -}}
|
||||
<option value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
|
||||
<label for="language-select-desktop">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<select class="language-select" id="language-select-desktop" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
{{- range $.Site.Languages -}}
|
||||
{{- if eq $translation.Lang .Lang -}}
|
||||
{{- if eq $.Page.Lang .Lang -}}
|
||||
<option value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}</option>
|
||||
{{- else -}}
|
||||
<option value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</select>
|
||||
</select>
|
||||
</label>
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
|
@ -61,21 +63,23 @@
|
|||
{{- end -}}
|
||||
{{- if .Site.IsMultiLingual -}}
|
||||
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<select class="language-select" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
{{- range $.Site.Languages -}}
|
||||
{{- if eq $translation.Lang .Lang -}}
|
||||
{{- if eq $.Page.Lang .Lang -}}
|
||||
<option value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}</option>
|
||||
{{- else -}}
|
||||
<option value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
|
||||
<label for="language-select-mobile">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<select class="language-select" id="language-select-mobile" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
{{- range $.Site.Languages -}}
|
||||
{{- if eq $translation.Lang .Lang -}}
|
||||
{{- if eq $.Page.Lang .Lang -}}
|
||||
<option value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}</option>
|
||||
{{- else -}}
|
||||
<option value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</select>
|
||||
</select>
|
||||
</label>
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
|
|
|
@ -22,4 +22,4 @@
|
|||
{{- .Set "iconfont" true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<i class="{{ delimit $classList ` ` }}"></i>
|
||||
<i class="{{ delimit $classList ` ` }}"></i>
|
|
@ -1,4 +1,4 @@
|
|||
<a href="{{ .href | safeURL }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .href "http" }} target="_blank"{{ end }} rel="noopener noreffer{{ with .rel }} {{ . }}{{ end }}">
|
||||
<a href="{{ .href | safeURL }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .href "http" }} target="_blank"{{ end }} rel="noopener noreffer{{ with .rel }} {{ . }}{{ end }}"{{ with .class }} class="{{ . }}"{{ end }}>
|
||||
{{- with .icon -}}
|
||||
{{- partial "plugin/icon.html" . -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -12,9 +12,8 @@
|
|||
{{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
|
||||
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
|
||||
<span class="post-author">
|
||||
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||
</a>
|
||||
{{- $link := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
|
||||
{{- partial "plugin/link.html" $link -}}
|
||||
</span>
|
||||
|
||||
{{- with .Params.categories -}}
|
||||
|
|
Loading…
Reference in a new issue