diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 0b3d504..83b72c3 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -65,11 +65,21 @@ params: shortname: hugo-minima # utterances specifies the configuration for Utterances. - # What is Utterances? Check this out: https://utteranc.es + # Check out https://utteranc.es for the following three attributes. utterances: - repo: "mivinci/hugo-theme-minima" - issueTerm: "pathname" - label: "comment" + repo: mivinci/hugo-theme-minima + issueTerm: pathname + label: comment + + # giscus specifies the configuration for Giscus. + # Check out https://giscus.app for the following six attributes. + giscus: + repo: mivinci/hugo-theme-minima + repoId: MDEwOlJlcG9zaXRvcnkzODcxMjM2NDU= + category: Comments + categoryId: DIC_kwDOFxMJvc4CScQm + mapping: pathname + inputPostion: buttom # **DEPRECATED** # ovo(https://ovo.js.org) is a comment plugin written by the author of Minima but diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2942994..1e49849 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -35,17 +35,23 @@ {{ end }} {{ if or .Params.comment (and .Site.Params.commentOnAllPosts (ne .Params.comment false)) }} + {{ if eq .Site.Params.comment "disqus"}} {{ partial "disqus.html" . }} {{ end }} - {{ if eq .Site.Params.comment "ovo"}} - {{ partial "ovo.html" . }} - {{ end }} - {{ if eq .Site.Params.comment "utterances"}} {{ partial "utterances.html" . }} {{ end }} + + {{ if eq .Site.Params.comment "giscus" }} + {{ partial "giscus.html" }} + {{ end }} + + {{ if eq .Site.Params.comment "ovo"}} + {{ partial "ovo.html" . }} + {{ end }} + {{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/giscus.html b/layouts/partials/giscus.html new file mode 100644 index 0000000..a32e484 --- /dev/null +++ b/layouts/partials/giscus.html @@ -0,0 +1,28 @@ + \ No newline at end of file