aboutsummaryrefslogtreecommitdiff
path: root/assets/templates/markdown-feed.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'assets/templates/markdown-feed.yaml')
-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 "{" "{" | replaceRE "}" "}" -}}
+{{ $content := .content }}
+
+{{- $content = replace $content "{" "{" -}}
+{{- $content = replace $content "}" "}" -}}
+{{- $content = replace $content "[" "[" -}}
+{{- $content = replace $content "]" "]" -}}
+
{{ $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 }}