diff options
author | tdro <tdro@noreply.example.com> | 2022-06-14 17:05:48 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-06-14 17:05:48 -0400 |
commit | ccd7bfb30d1d2e94fc4f0b9cada8f07404452376 (patch) | |
tree | ddc43091640b9b0fce647d75e4de55abd1aec7a0 /assets/templates | |
parent | 9004d0104ae2e7fda0341228f9247fcb45d3eaad (diff) | |
download | canory-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.yaml | 22 |
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 "{" "{" - | replaceRE "}" "}" -}} [Read More →]({{ .link }}) +{{ $content := .content | replaceRE "{" "{" | replaceRE "}" "}" -}} +{{ $content }} [Read More →]({{ .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 }} |