From 85767be8799d6db403d0568c68f5992573eef400 Mon Sep 17 00:00:00 2001 From: ormissia Date: Wed, 10 Nov 2021 09:18:04 +0800 Subject: [PATCH] add comment plugin utteranc(save message to github issue) config.yml # Enable comment feature. There, should be only one of them. comment: enable: true utteranc: repo: ormissia/ormissia.github.io issueTerm: title theme: github-light --- layouts/_default/single.html | 3 +++ layouts/partials/utteranc.html | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 layouts/partials/utteranc.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2423a98..633fe1f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -165,6 +165,9 @@ {{ else if .valine }} {{ partial "valine.html" . }} + + {{ else if .utteranc }} + {{ partial "utteranc.html" . }} {{ end }} {{ end }} {{ end }} diff --git a/layouts/partials/utteranc.html b/layouts/partials/utteranc.html new file mode 100644 index 0000000..2b8cade --- /dev/null +++ b/layouts/partials/utteranc.html @@ -0,0 +1,27 @@ +{{ $repo := site.Params.features.comment.utteranc.repo }} +{{ $issueTerm := site.Params.features.comment.utteranc.issueTerm }} +{{ $theme := site.Params.features.comment.utteranc.theme }} + +
+
+
+
+ + + + {{ i18n "comments_by" }} utteranc + +