From 149ce0df220cfb00f9a47bc3a90258ead6a70189 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Wed, 13 Sep 2023 17:06:00 -0400 Subject: [PATCH] I think I'm almost at a functional ui if I do the docker compose now but it's annoying --- config.toml | 5 +++++ layouts/_default/single.html | 1 + layouts/partials/comments.html | 6 ++++++ layouts/partials/head.html | 1 + 4 files changed, 13 insertions(+) create mode 100644 layouts/partials/comments.html 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)) "" }} +