diff --git a/config.toml b/config.toml index 8f367e6..1a61063 100644 --- a/config.toml +++ b/config.toml @@ -29,3 +29,8 @@ theme = "liquorice" [markup.goldmark] [markup.goldmark.renderer] unsafe = true + +[security] + [security.funcs] + # first 2 vars are things hugo has built in and I'm keeping to avoid breakage + getenv = ['^HUGO_', '^CI$', "COMMENTS_BACKEND"] diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7f24c24..a315a60 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -37,6 +37,7 @@ {{ partial "author.html" .}} + {{ partial "comments.html" . }}
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 0000000..64b0d6a --- /dev/null +++ b/layouts/partials/comments.html @@ -0,0 +1,6 @@ + + + {{ cond (not (eq (os.Getenv "COMMENTS_BACKEND") "")) (safeHTML (printf "
" .File.Path)) ""}} + diff --git a/layouts/partials/head.html b/layouts/partials/head.html index d8aa0b8..b1a80a0 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -10,6 +10,7 @@ {{ cond (eq .Page.Kind "page") (safeHTML (printf "" .Site.BaseURL)) "" }} +