From d00dbc17bc1e8f12557f049127d279e00d5e11ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=9B=E5=B7=B3=E6=B5=81=E7=81=AB?= <59004461+ambition-echo@users.noreply.github.com> Date: Sun, 31 Jul 2022 18:39:20 +0800 Subject: [PATCH] feat(comment): add `strict` and `input-position` to Giscus config (#648) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加giscus设置选项 根据giscus官方文档,添加了data-strict和data-input-position设置选项 * feat: add strict and inputPosition to giscus config section Co-authored-by: Jimmy Cai --- config.yaml | 2 ++ layouts/partials/comments/provider/giscus.html | 2 ++ 2 files changed, 4 insertions(+) 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"