From 1002146574310f24183e49a70e7c273b2f0d6511 Mon Sep 17 00:00:00 2001 From: geekifan Date: Mon, 28 Apr 2025 12:12:58 +0800 Subject: [PATCH] add comment system --- layouts/partials/comment.html | 4 ++ layouts/partials/comments/disqus.html | 57 +++++++++++++++++++++++ layouts/partials/comments/giscus.html | 54 +++++++++++++++++++++ layouts/partials/comments/utterances.html | 37 +++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 layouts/partials/comment.html create mode 100644 layouts/partials/comments/disqus.html create mode 100644 layouts/partials/comments/giscus.html create mode 100644 layouts/partials/comments/utterances.html diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html new file mode 100644 index 0000000..608b101 --- /dev/null +++ b/layouts/partials/comment.html @@ -0,0 +1,4 @@ +{{ $enableComment := .Params.comment | default .Site.Params.comment.enable }} +{{ if and $enableComment .Site.Params.comment.provider }} + {{ partial (printf "comments/%s.html" .Site.Params.comment.provider) . }} +{{ end }} diff --git a/layouts/partials/comments/disqus.html b/layouts/partials/comments/disqus.html new file mode 100644 index 0000000..af8d411 --- /dev/null +++ b/layouts/partials/comments/disqus.html @@ -0,0 +1,57 @@ + \ No newline at end of file diff --git a/layouts/partials/comments/giscus.html b/layouts/partials/comments/giscus.html new file mode 100644 index 0000000..d064685 --- /dev/null +++ b/layouts/partials/comments/giscus.html @@ -0,0 +1,54 @@ + diff --git a/layouts/partials/comments/utterances.html b/layouts/partials/comments/utterances.html new file mode 100644 index 0000000..6a85b94 --- /dev/null +++ b/layouts/partials/comments/utterances.html @@ -0,0 +1,37 @@ + \ No newline at end of file