diff --git a/README.md b/README.md index c3f2a925..e08866fd 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ FixIt supports the following languages: * English * Simplified Chinese +* Traditional Chinese * French * Polish * Brazilian Portuguese @@ -190,9 +191,9 @@ FixIt supports the following languages: * Russian * Romanian * Vietnamese -* Traditional Chinese * [Contribute with a new language](https://github.com/Lruihao/FixIt/pulls) -* [Languages Compatibility](https://fixit.lruihao.cn/theme-documentation-basics/#language-compatibility) + +[Languages Compatibility](https://fixit.lruihao.cn/theme-documentation-basics/#language-compatibility) ## [Roadmap](https://github.com/Lruihao/FixIt/projects/1) @@ -246,6 +247,7 @@ Thanks to the authors of following resources included in the theme: * [Waline](https://waline.js.org/) * [Twikoo](https://twikoo.js.org/) * [github-corners](https://github.com/tholman/github-corners) +* [giscus](https://giscus.app/) ## Author diff --git a/README.zh-cn.md b/README.zh-cn.md index 8e3e283a..2419a96b 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -179,6 +179,7 @@ FixIt 支持下列语言: * 英语 * 简体中文 +* 繁体中文 * 法语 * 波兰语 * 巴西葡萄牙语 @@ -189,9 +190,9 @@ FixIt 支持下列语言: * 俄语 * 罗马尼亚语 * 越南语 -* 繁体中文 * [贡献一种新的语言](https://github.com/Lruihao/FixIt/pulls) -* [语言兼容性](https://fixit.lruihao.cn/zh-cn/theme-documentation-basics/#language-compatibility) + +[语言兼容性](https://fixit.lruihao.cn/zh-cn/theme-documentation-basics/#language-compatibility) ## [路线图](https://github.com/Lruihao/FixIt/projects/1) @@ -245,6 +246,7 @@ FixIt 主题中用到了以下项目,感谢它们的作者: * [Waline](https://waline.js.org/) * [Twikoo](https://twikoo.js.org/) * [github-corners](https://github.com/tholman/github-corners) +* [giscus](https://giscus.app/zh-CN) ## 作者 diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9b896bac..907e1b5c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -536,7 +536,7 @@ enableEmoji = true images = ["/logo.png"] # enable PWA since v0.2.12 # 开启 PWA 支持 since v0.2.12 - enablePWA = true + enablePWA = false # whether to add external Icon for external links automatically since v0.2.14 # 是否自动显示外链图标 since v0.2.14 externalIcon = true @@ -927,6 +927,8 @@ enableEmoji = true # It take effect when `params.page.lightgallery` is enabled # 当 `params.page.lightgallery` 启用时生效 lightgallery = false + # Giscus comments config (https://giscus.app/) since v0.2.14 + # Giscus 评论系统设置 (https://giscus.app/) since v0.2.14 [params.page.comment.giscus] enable = true repo = "Lruihao/FixIt" @@ -934,6 +936,7 @@ enableEmoji = true category = "General" categoryId = "DIC_kwDOGihPtc4CApHX" mapping = "title" + term = "" reactionsEnabled = "1" emitMetadata = "0" inputPosition = "bottom" # top, bottom diff --git a/exampleSite/content/about/index.en.md b/exampleSite/content/about/index.en.md index 7386eb73..b54fb16f 100644 --- a/exampleSite/content/about/index.en.md +++ b/exampleSite/content/about/index.en.md @@ -2,6 +2,7 @@ title: "About FixIt" date: 2019-08-02T11:04:49+08:00 draft: false +comment: false lightgallery: true @@ -126,4 +127,5 @@ Thanks to the authors of following resources included in the theme: * [Artalk](https://artalk.js.org/) * [Waline](https://waline.js.org/) * [Twikoo](https://twikoo.js.org/) -* [github-corners](https://github.com/tholman/github-corners) \ No newline at end of file +* [github-corners](https://github.com/tholman/github-corners) +* [giscus](https://giscus.app/) \ No newline at end of file diff --git a/exampleSite/content/about/index.zh-cn.md b/exampleSite/content/about/index.zh-cn.md index a2a7fe8c..7fc8b739 100644 --- a/exampleSite/content/about/index.zh-cn.md +++ b/exampleSite/content/about/index.zh-cn.md @@ -2,6 +2,7 @@ title: "关于 FixIt" date: 2019-08-02T11:04:49+08:00 draft: false +comment: false lightgallery: true @@ -127,3 +128,4 @@ FixIt 主题中用到了以下项目,感谢它们的作者: * [Waline](https://waline.js.org/) * [Twikoo](https://twikoo.js.org/) * [github-corners](https://github.com/tholman/github-corners) +* [giscus](https://giscus.app/zh-CN) diff --git a/exampleSite/content/friends/index.en.md b/exampleSite/content/friends/index.en.md index 87998f41..6014d0d3 100644 --- a/exampleSite/content/friends/index.en.md +++ b/exampleSite/content/friends/index.en.md @@ -6,7 +6,7 @@ description: "Friends tempalate demo of FixIt theme" keywords: - Hugo - friends tempalate -comment: false +comment: true --- --- diff --git a/exampleSite/content/friends/index.zh-cn.md b/exampleSite/content/friends/index.zh-cn.md index 5dcd405e..5dcba49c 100644 --- a/exampleSite/content/friends/index.zh-cn.md +++ b/exampleSite/content/friends/index.zh-cn.md @@ -6,7 +6,7 @@ description: "FixIt 主题的友链模板 Demo" keywords: - Hugo - 友情链接 -comment: false +comment: true --- --- diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 56d7aff1..a4fab655 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -656,6 +656,20 @@ Please open the code block below to view the complete sample configuration :(far commentCount = true # It take effect when `params.page.lightgallery` is enabled lightgallery = false + # {{< version 0.2.14 >}} {{< link "https://giscus.app/" "Giscus" >}} comments config + [params.page.comment.giscus] + enable = false + repo = "" + repoId = "" + category = "" + categoryId = "" + mapping = "" + reactionsEnabled = "1" + emitMetadata = "0" + inputPosition = "bottom" # top, bottom + lightTheme = "light" + darkTheme = "dark" + lazyLoad = true # {{< version 0.2.7 >}} Third-party library config [params.page.library] [params.page.library.css] diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 0b7b3461..166ef718 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -666,6 +666,20 @@ hugo commentCount = true # 当 `params.page.lightgallery` 启用时生效 lightgallery = false + # {{< version 0.2.14 >}} {{< link "https://giscus.app/" "Giscus" >}} 评论系统设置 + [params.page.comment.giscus] + enable = false + repo = "" + repoId = "" + category = "" + categoryId = "" + mapping = "" + reactionsEnabled = "1" + emitMetadata = "0" + inputPosition = "bottom" # top, bottom + lightTheme = "light" + darkTheme = "dark" + lazyLoad = true # {{< version 0.2.7 >}} 第三方库配置 [params.page.library] [params.page.library.css] diff --git a/layouts/partials/single/comment.html b/layouts/partials/single/comment.html index 850eb9da..c52fdc6c 100644 --- a/layouts/partials/single/comment.html +++ b/layouts/partials/single/comment.html @@ -246,10 +246,11 @@ data-category="{{ .Category }}" data-category-id="{{ .CategoryId }}" data-mapping="{{ .Mapping }}" + {{ if .Term }}data-term="{{ .Term }}"{{ end }} data-theme="preferred_color_scheme" data-reactions-enabled="{{ .ReactionsEnabled }}" - data-emit-metadata="{{ .emitMetadata }}" - data-input-position="{{ .inputPosition }}" + data-emit-metadata="{{ .EmitMetadata }}" + data-input-position="{{ .EnputPosition }}" data-lang="{{ $.Site.LanguageCode }}" {{ if ne .LazyLoad false }}data-loading="lazy"{{ end }} crossorigin="anonymous"