aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2024-02-06 15:43:46 -0500
committertdro <tdro@noreply.example.com>2024-02-06 15:43:46 -0500
commit6d34db5f21dbf5f281a48b2c8bf6a4e5f4e88c30 (patch)
treeac0eae3dbab91cfb7e5d835c0980ae663141d5cb /assets
parent219ffd9dd76638810271cc0733ff7732d873eac8 (diff)
downloadcanory-6d34db5f21dbf5f281a48b2c8bf6a4e5f4e88c30.tar.gz
canory-6d34db5f21dbf5f281a48b2c8bf6a4e5f4e88c30.tar.bz2
canory-6d34db5f21dbf5f281a48b2c8bf6a4e5f4e88c30.zip
assets/templates/markdown-feed: Tighten this up
Diffstat (limited to 'assets')
-rw-r--r--assets/templates/markdown-feed.yaml17
1 files changed, 12 insertions, 5 deletions
diff --git a/assets/templates/markdown-feed.yaml b/assets/templates/markdown-feed.yaml
index fbe763b..ff0aae5 100644
--- a/assets/templates/markdown-feed.yaml
+++ b/assets/templates/markdown-feed.yaml
@@ -21,12 +21,19 @@ feed:
{{ end -}}
---
-{{ $content := .content | replaceRE "{" "&#123;" | replaceRE "}" "&#125;" -}}
+{{ $content := .content }}
+
+{{- $content = replace $content "{" "&#123;" -}}
+{{- $content = replace $content "}" "&#125;" -}}
+{{- $content = replace $content "[" "&#91;" -}}
+{{- $content = replace $content "]" "&#93;" -}}
+
{{ $content }}
-{{- $enclosureDescription := "Image/Picture" -}}
+{{- $caption := "Image/Picture" -}}
+
{{- with $content -}}
- {{ $enclosureDescription = $content | truncate 80 "" }}
+ {{ $caption = $content | truncate 80 "" }}
{{- end }}
{{ with .enclosure -}}
@@ -43,8 +50,8 @@ feed:
(in . ".svg")
(in . ".webp")
-}}
-![{{ $enclosureDescription }}]({{ . }} "
- {{ $enclosureDescription }}"
+![{{ $caption }}]({{ . }} "
+ {{ $caption }}"
)
{{- end -}}
{{- end }}