feat(giscus): standardize configuration, support i18n and add lazyLoading config

This commit is contained in:
Dillon
2022-05-26 01:51:17 +08:00
parent 487a772442
commit 61eccb2502
23 changed files with 156 additions and 61 deletions

View File

@@ -500,6 +500,8 @@ enableEmoji = true
avatar = "mp"
meta= ""
pageSize = 10
# automatically adapt the current theme i18n configuration when empty
# 为空时自动适配当前主题 i18n 配置
lang = ""
visitor = true
recordIP = true
@@ -524,6 +526,8 @@ enableEmoji = true
width = "100%"
numPosts = 10
appId = ""
# automatically adapt the current theme i18n configuration when empty
# 为空时自动适配当前主题 i18n 配置
languageCode = ""
# Telegram comments config (https://comments.app/)
# Telegram comments 评论系统设置 (https://comments.app/)
@@ -550,25 +554,26 @@ enableEmoji = true
label = ""
lightTheme = "github-light"
darkTheme = "github-dark"
# giscus comment config (https://giscus.app/)
# giscus comment 评论系统设置 (https://giscus.app/zh-CN)
[params.page.comment.giscus]
# To enable giscus, the github discussions based comment section,
# Follow the steps described to enable giscus and get the values
# needed to populate the below information.
# https://www.joelnitta.com/posts/2021-11-24_using-giscus/
# enable = true
category = "Announcements" # Announcements, Comments
lang = "en" # 保持 en, 只需要控制每篇文章的 url 不一样即可
repo = "" # Entering repo will enable giscus
repo_id = "" # query by GraphQL API, https://docs.github.com/en/graphql/overview/explorer
category_id = "" # query by GraphQL API, https://docs.github.com/en/graphql/overview/explorer
# You can refer to the official documentation of giscus to use the following configuration.
# 你可以参考官方文档来使用下列配置
enable = false
repo = ""
repoId = ""
category = "Announcements"
categoryId = ""
# automatically adapt the current theme i18n configuration when empty
# 为空时自动适配当前主题 i18n 配置
lang = ""
mapping = "pathname"
reactions_enabled = "0"
emit_metadata = "0"
input_position = "top"
lightTheme = "light" # github theme
darkTheme = "dark" # github theme
crossorigin = "anonymous"
label = "Comment" # Label applied to issue by utteranc.es bot
reactionsEnabled = "1"
emitMetadata = "0"
inputPosition = "bottom"
lazyLoading = false
lightTheme = "light"
darkTheme = "dark"
# Third-party library config
# 第三方库配置
[params.page.library]