Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author辛巳流火 <59004461+ambition-echo@users.noreply.github.com>2022-07-31 13:39:20 +0300
committerGitHub <noreply@github.com>2022-07-31 13:39:20 +0300
commitd00dbc17bc1e8f12557f049127d279e00d5e11ec (patch)
treeb90884daea7726936b0497e7047e0ecb49055c32
parent655b5102c4caffb76f38c68d353b992de036b007 (diff)
feat(comment): add `strict` and `input-position` to Giscus config (#648)
* 添加giscus设置选项 根据giscus官方文档,添加了data-strict和data-input-position设置选项 * feat: add strict and inputPosition to giscus config section Co-authored-by: Jimmy Cai <github@jimmycai.com>
-rw-r--r--config.yaml2
-rw-r--r--layouts/partials/comments/provider/giscus.html2
2 files changed, 4 insertions, 0 deletions
diff --git a/config.yaml b/config.yaml
index 93367bb..fcb4bcb 100644
--- a/config.yaml
+++ b/config.yaml
@@ -92,10 +92,12 @@ params:
category:
categoryID:
mapping:
+ strict:
lightTheme:
darkTheme:
reactionsEnabled: 1
emitMetadata: 0
+ inputPosition:
lang:
gitalk:
diff --git a/layouts/partials/comments/provider/giscus.html b/layouts/partials/comments/provider/giscus.html
index abe345f..f7f435d 100644
--- a/layouts/partials/comments/provider/giscus.html
+++ b/layouts/partials/comments/provider/giscus.html
@@ -6,8 +6,10 @@
data-category="{{- .category -}}"
data-category-id="{{- .categoryID -}}"
data-mapping="{{- default `title` .mapping -}}"
+ data-strict="{{- default 0 .strict -}}"
data-reactions-enabled="{{- default 1 .reactionsEnabled -}}"
data-emit-metadata="{{- default 0 .emitMetadata -}}"
+ data-input-position="{{- default `top` .inputPosition -}}"
data-theme="{{- default `light` .lightTheme -}}"
data-lang="{{- default `en` .lang -}}"
crossorigin="anonymous"