From ccd7bfb30d1d2e94fc4f0b9cada8f07404452376 Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 14 Jun 2022 17:05:48 -0400 Subject: assets/templates/markdown-feed: Truncate enclosure description Remove unused author and description variables. --- assets/templates/markdown-feed.yaml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'assets/templates') 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 }} -- cgit v1.2.3