From 62a9e084215cf453ceb5146facd1d1b766dd58fe Mon Sep 17 00:00:00 2001 From: James Ray Date: Mon, 28 Feb 2022 01:42:36 -0500 Subject: [PATCH] add giscus --- layouts/_default/single.html | 3 +++ layouts/partials/giscus.html | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 layouts/partials/giscus.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a417869..3ad7d5f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -168,6 +168,9 @@ {{ else if .utteranc }} {{ partial "utteranc.html" . }} + + {{ else if .giscus }} + {{ partial "giscus.html" . }} {{ end }} {{ end }} {{ end }} diff --git a/layouts/partials/giscus.html b/layouts/partials/giscus.html new file mode 100644 index 0000000..1ae1eb6 --- /dev/null +++ b/layouts/partials/giscus.html @@ -0,0 +1,21 @@ +{{ $repo := site.Params.features.comment.giscus.repo }} +{{ $category := site.Params.features.comment.giscus.category | default "Announcements" }} +{{ $theme := site.Params.features.comment.giscus.theme | default "dark" }} +{{ $map := site.Params.features.comment.giscus.map | default "url" }} +{{ $reaction := site.Params.features.comment.giscus.reaction | default "1" }} +{{ $metadata := site.Params.features.comment.giscus.metadata | default "0" }} +{{ $inputPosition := site.Params.features.comment.giscus.inputPosition | default "bottom" }} +{{ $crossOrigin := site.Params.features.comment.giscus.crossOrigin | default "anonymous" }} + +