aboutsummaryrefslogtreecommitdiff
path: root/assets/templates
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-06-14 17:05:48 -0400
committertdro <tdro@noreply.example.com>2022-06-14 17:05:48 -0400
commitccd7bfb30d1d2e94fc4f0b9cada8f07404452376 (patch)
treeddc43091640b9b0fce647d75e4de55abd1aec7a0 /assets/templates
parent9004d0104ae2e7fda0341228f9247fcb45d3eaad (diff)
downloadcanory-ccd7bfb30d1d2e94fc4f0b9cada8f07404452376.tar.gz
canory-ccd7bfb30d1d2e94fc4f0b9cada8f07404452376.tar.bz2
canory-ccd7bfb30d1d2e94fc4f0b9cada8f07404452376.zip
assets/templates/markdown-feed: Truncate enclosure description
Remove unused author and description variables.
Diffstat (limited to 'assets/templates')
-rw-r--r--assets/templates/markdown-feed.yaml22
1 files changed, 7 insertions, 15 deletions
diff --git a/assets/templates/markdown-feed.yaml b/assets/templates/markdown-feed.yaml
index 7225f46..3e7d9a9 100644
--- a/assets/templates/markdown-feed.yaml
+++ b/assets/templates/markdown-feed.yaml
@@ -21,24 +21,16 @@ feed:
{{ end -}}
---
-{{ .content
- | replaceRE "{" "&#123;"
- | replaceRE "}" "&#125;"
-}} [Read More &rarr;]({{ .link }})
+{{ $content := .content | replaceRE "{" "&#123;" | replaceRE "}" "&#125;" -}}
+{{ $content }} [Read More &rarr;]({{ .link }})
-
-{{- $author := "default" -}}
-{{- with $.author -}}
- {{ $author = . }}
-{{- end -}}
-
-{{- $description := "Image/Picture" -}}
-{{- with $.description -}}
- {{ $description = . | htmlEscape }}
+{{- $enclosureDescription := "Image/Picture" -}}
+{{- with $content -}}
+ {{ $enclosureDescription = $content | truncate 80 "" }}
{{- end }}
{{ with .enclosure -}}
-![{{ $description }}]({{ . }} "
- {{ $description }}"
+![{{ $enclosureDescription }}]({{ . }} "
+ {{ $enclosureDescription }}"
)
{{- end }}