diff options
-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 }} |