diff --git a/config.toml b/config.toml index 2d1247d..c2d865f 100644 --- a/config.toml +++ b/config.toml @@ -84,3 +84,17 @@ defaultContentLanguageInSubdir = true [params.geekblogHostedOn] name = "GitHub Pages" link = "https://pages.github.com" + + [params.giscus] + repo = "gantrior/tomas-panik-blog" + repoID = "R_kgDOKOxIRA" + category = "Announcements" + categoryID = "DIC_kwDOKOxIRM4CZEzu" + mapping = "og:title" + strict = "0" + reactionsEnabled = "1" + emitMetadata = "0" + inputPosition = "bottom" + theme = "dark" + lang = "en" + loading = "lazy" diff --git a/themes/hugo-geekblog/layouts/_default/single.html b/themes/hugo-geekblog/layouts/_default/single.html index 571df1c..0c4cd3d 100644 --- a/themes/hugo-geekblog/layouts/_default/single.html +++ b/themes/hugo-geekblog/layouts/_default/single.html @@ -53,5 +53,25 @@

{{ partial "utils/title" . }}

{{ partial "utils/content" . }}
+ {{- if isset .Site.Params "giscus" -}} + {{- if and (isset .Site.Params.giscus "repo") (not (eq .Site.Params.giscus.repo "" )) (eq (.Params.disable_comments | default false) false) -}} + + {{- end -}} + {{- end -}} {{ end }}