From ba4619060311b8be1913a733af4fcc16aa7e1eb0 Mon Sep 17 00:00:00 2001 From: recanman <29310982+recanman@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:19:35 -0700 Subject: [PATCH 1/2] fix: check existence of goal as it is never zero --- layouts/shortcodes/ccs_item.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/ccs_item.html b/layouts/shortcodes/ccs_item.html index 2cfa50b..7941d88 100644 --- a/layouts/shortcodes/ccs_item.html +++ b/layouts/shortcodes/ccs_item.html @@ -7,7 +7,7 @@ {{ $goal := .Get "goal" }} {{ $raised := .Get "raised" }} - {{ with .Get "raised" }} + {{ with $goal }}

Raised {{ $raised }} of {{ $goal }} XMR ({{ div (.) ($goal) | mul 100 | int }}%)

{{ end }} \ No newline at end of file From 3104b7fb1cf6c5ea2b2ca4014e0ea98cfc2d56f6 Mon Sep 17 00:00:00 2001 From: recanman <29310982+recanman@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:24:20 -0700 Subject: [PATCH 2/2] fix: exclude "Weeklies" entry in RSS feed --- layouts/_default/index.rss.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/layouts/_default/index.rss.xml b/layouts/_default/index.rss.xml index b67fd9c..9238133 100644 --- a/layouts/_default/index.rss.xml +++ b/layouts/_default/index.rss.xml @@ -12,16 +12,18 @@ {{ range where .Site.Pages "Type" "weekly" }} - - {{ .Title }} - {{ .Permalink }} - {{ .Permalink }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} + {{ if ne .Title "Weeklies" }} + + {{ .Title }} + {{ .Permalink }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} - {{ .Content | truncate 350 | html }} - - - + {{ .Content | truncate 350 | html }} + + + + {{ end }} {{ end }} \ No newline at end of file