feat: add detection of the theme version and Hugo version (#173)
* feat: add detection of the theme version and Hugo version * fix: hugo.IsProduction is incompatible in Hugo v0.62.0
This commit is contained in:
@@ -216,10 +216,12 @@ enableEmoji = true
|
||||
enable = true
|
||||
# Disqus Comment Config (https://disqus.com/)
|
||||
[languages.en.params.comment.disqus]
|
||||
enable = false
|
||||
# Disqus shortname to use Disqus in posts
|
||||
shortname = ""
|
||||
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
[languages.en.params.comment.gitalk]
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
clientId = ""
|
||||
@@ -436,10 +438,12 @@ enableEmoji = true
|
||||
enable = true
|
||||
# Disqus 评论系统设置 (https://disqus.com/)
|
||||
[languages.zh-cn.params.comment.disqus]
|
||||
enable = false
|
||||
# Disqus 的 shortname,用来在文章中启用 Disqus 评论系统
|
||||
shortname = ""
|
||||
# Gitalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||
[languages.zh-cn.params.comment.gitalk]
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
clientId = ""
|
||||
@@ -691,7 +695,7 @@ enableEmoji = true
|
||||
[params]
|
||||
# LoveIt theme version
|
||||
# LoveIt 主题版本
|
||||
version = "0.1.X"
|
||||
version = "0.2.X"
|
||||
# public git repo url only then enableGitInfo is true
|
||||
# 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
|
||||
gitRepo = "https://github.com/dillonzq/LoveIt"
|
||||
|
||||
@@ -189,7 +189,7 @@ Note that some of these parameters are explained in details in other sections of
|
||||
defaultTheme = "auto"
|
||||
# public git repo url only then enableGitInfo is true
|
||||
gitRepo = ""
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
# which hash function used for SRI, when empty, no SRI is used ("sha256", "sha384", "sha512", "md5")
|
||||
fingerprint = ""
|
||||
# Header info
|
||||
@@ -349,13 +349,13 @@ Note that some of these parameters are explained in details in other sections of
|
||||
enable = true
|
||||
# Disqus Comment Config (https://disqus.com/)
|
||||
[params.comment.disqus]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
enable = false
|
||||
# Disqus shortname to use Disqus in posts
|
||||
shortname = ""
|
||||
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
[params.comment.gitalk]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
|
||||
@@ -189,7 +189,7 @@ Note that some of these parameters are explained in details in other sections of
|
||||
defaultTheme = "auto"
|
||||
# public git repo url only then enableGitInfo is true
|
||||
gitRepo = ""
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
# which hash function used for SRI, when empty, no SRI is used ("sha256", "sha384", "sha512", "md5")
|
||||
fingerprint = ""
|
||||
# Header info
|
||||
@@ -349,13 +349,13 @@ Note that some of these parameters are explained in details in other sections of
|
||||
enable = true
|
||||
# Disqus Comment Config (https://disqus.com/)
|
||||
[params.comment.disqus]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
enable = false
|
||||
# Disqus shortname to use Disqus in posts
|
||||
shortname = ""
|
||||
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
[params.comment.gitalk]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
|
||||
@@ -192,7 +192,7 @@ hugo
|
||||
defaultTheme = "auto"
|
||||
# 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
|
||||
gitRepo = ""
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
# 哪种哈希函数用来 SRI, 为空时表示不使用 SRI ("sha256", "sha384", "sha512", "md5")
|
||||
fingerprint = ""
|
||||
# 页面头部导航栏信息
|
||||
@@ -351,13 +351,13 @@ hugo
|
||||
enable = true
|
||||
# Disqus 评论系统设置 (https://disqus.com/)
|
||||
[params.comment.disqus]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
enable = false
|
||||
# Disqus 的 shortname,用来在文章中启用 Disqus 评论系统
|
||||
shortname = ""
|
||||
# Gitalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||
[params.comment.gitalk]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.1.1
|
||||
# {{< version 0.1.1 >}}
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
|
||||
@@ -76,7 +76,7 @@ comment: true
|
||||
```
|
||||
|
||||
* **title**: the title for the content.
|
||||
* **subtitle**: the subtitle for the content. **LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.2.0**
|
||||
* **subtitle**: the subtitle for the content. {{< version 0.2.0 >}}
|
||||
* **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.
|
||||
|
||||
@@ -76,7 +76,7 @@ comment: true
|
||||
```
|
||||
|
||||
* **title**: the title for the content.
|
||||
* **subtitle**: the subtitle for the content. **LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.2.0**
|
||||
* **subtitle**: the subtitle for the content. **{{< version 0.2.0 >}}**
|
||||
* **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.
|
||||
|
||||
@@ -76,7 +76,7 @@ comment: true
|
||||
```
|
||||
|
||||
* **title**: 文章标题.
|
||||
* **subtitle**: 文章副标题. **LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): 0.2.0**
|
||||
* **subtitle**: 文章副标题. **{{< version 0.2.0 >}}**
|
||||
* **date**: 这篇文章创建的日期时间. 它通常是从文章的前置参数中的 `date` 字段获取的, 但是也可以在 [网站配置](../theme-documentation-basics/#site-configuration) 中设置.
|
||||
* **lastmod**: 上次修改内容的日期时间.
|
||||
* **draft**: 如果设为 `true`, 除非 `hugo` 命令使用了 `--buildDrafts`/`-D` 参数, 这篇文章不会被渲染.
|
||||
|
||||
Reference in New Issue
Block a user