diff options
Diffstat (limited to 'assets/templates')
-rw-r--r-- | assets/templates/markdown-feed.yaml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/assets/templates/markdown-feed.yaml b/assets/templates/markdown-feed.yaml index bf883c0..8361144 100644 --- a/assets/templates/markdown-feed.yaml +++ b/assets/templates/markdown-feed.yaml @@ -11,6 +11,7 @@ feed: {{ range $key, $value := . -}} {{- if and + (ne $key "author") (ne $key "content") (ne $key "date") (ne $key "tags") @@ -24,3 +25,24 @@ feed: | replaceRE "{" "{" | replaceRE "}" "}" }} [Read More →]({{ .link }}) + +{{ with .enclosure -}} + +{{- $author := "default" -}} +{{- with $.author -}} + {{ $author = . }} +{{- end -}} + +{{- $description := "Image/Picture" -}} +{{- with $.description -}} + {{ $description = . | htmlEscape }} +{{- end -}} + +{{- with $enclosure := resources.GetRemote . -}} +{{- $enclosure = .Content | resources.FromString (print $author "/media/" ($enclosure | urlize)) -}} +![{{ $description }}]({{ ($enclosure.Resize "600x").RelPermalink }} " + {{ $description }}" +) +{{- end -}} + +{{- end }} |