From dafea2e479d99ec1c0fe970974de2acb24739694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Wed, 29 Jun 2022 19:31:16 +0800 Subject: [PATCH] :construction: optimization comment system setting. --- assets/css/main.scss | 12 +++++++----- .../partials/_thirdparty/comment/artalk.html | 2 -- .../partials/_thirdparty/comment/giscus.html | 18 ++++++++++++++++++ .../_thirdparty/comment/utterances.html | 2 -- .../partials/_thirdparty/comment/waline.html | 4 +--- 5 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 layouts/partials/_thirdparty/comment/giscus.html diff --git a/assets/css/main.scss b/assets/css/main.scss index cb1031d..718a92c 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -125,14 +125,16 @@ $algolia_search_enable : {{ $P.algoliaSearch.enable }}; $local_search_enable : {{ $P.localSearch.enable }}; // Online IM -$gitalk_enable : {{ $P.gitalk.enable }}; +//$gitalk_enable : {{ $P.gitalk.enable }}; +$gitalk_enable : false; $gitter_enable : {{ $P.gitter.enable }}; // Comment -$disqusjs_enable : {{ $P.disqusjs.enable }}; -$livere_enable : {{ $P.livere.enable }}; -$utterances_enable : {{ $P.utterances.enable }}; -$waline_enable : {{ $P.waline.enable }}; +//$disqusjs_enable : {{ $P.disqusjs.enable }}; +$disqusjs_enable : false; +$livere_enable : {{ isset $P.livere "uid" }}; +$utterances_enable : {{ isset $P.utterances "utterances" }}; +$waline_enable : {{ isset $P.waline "serverurl" }}; {{- with .Site.Params.comments }} {{- $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }} $two_comments_enable : {{ $tce }}; diff --git a/layouts/partials/_thirdparty/comment/artalk.html b/layouts/partials/_thirdparty/comment/artalk.html index 7787d7e..f0683a3 100644 --- a/layouts/partials/_thirdparty/comment/artalk.html +++ b/layouts/partials/_thirdparty/comment/artalk.html @@ -1,4 +1,3 @@ -{{- if .Site.Params.artalk.enable }} {{- with .Site.Params.artalk }} @@ -18,5 +17,4 @@ }) {{- end }} -{{- end }} diff --git a/layouts/partials/_thirdparty/comment/giscus.html b/layouts/partials/_thirdparty/comment/giscus.html new file mode 100644 index 0000000..d1b476f --- /dev/null +++ b/layouts/partials/_thirdparty/comment/giscus.html @@ -0,0 +1,18 @@ +{{- with .Site.Params.giscus }} +
+ +{{- end }} \ No newline at end of file diff --git a/layouts/partials/_thirdparty/comment/utterances.html b/layouts/partials/_thirdparty/comment/utterances.html index 6115b95..2d26357 100644 --- a/layouts/partials/_thirdparty/comment/utterances.html +++ b/layouts/partials/_thirdparty/comment/utterances.html @@ -1,5 +1,4 @@ {{- with .Site.Params.utterances }} -{{- if .enable }} {{- end }} -{{- end }} diff --git a/layouts/partials/_thirdparty/comment/waline.html b/layouts/partials/_thirdparty/comment/waline.html index ff07bb6..a533da5 100644 --- a/layouts/partials/_thirdparty/comment/waline.html +++ b/layouts/partials/_thirdparty/comment/waline.html @@ -1,4 +1,3 @@ -{{- if .Site.Params.waline.enable }} {{- with .Site.Params.waline }}
@@ -21,5 +20,4 @@ dark : "auto" }); -{{- end }} -{{- end }} \ No newline at end of file +{{- end }} \ No newline at end of file