From 4e029b7de8fc432012f2279e4bcbe65727e4f055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E7=BA=A2=E8=B1=86?= <55517494+ormissia@users.noreply.github.com> Date: Fri, 19 Nov 2021 01:17:46 +0800 Subject: [PATCH] Add utteranc comment plugin (#465) * 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 * Update utteranc.html --- layouts/_default/single.html | 3 +++ layouts/partials/utteranc.html | 22 ++++++++++++++++++++++ 2 files changed, 25 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..0bbaaad --- /dev/null +++ b/layouts/partials/utteranc.html @@ -0,0 +1,22 @@ +{{ $repo := site.Params.features.comment.utteranc.repo }} +{{ $issueTerm := site.Params.features.comment.utteranc.issueTerm }} +{{ $theme := site.Params.features.comment.utteranc.theme }} + +
+
+
+
+