blob: ff0aae5092e9b35cc8a7f4a210b53004bd3666e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
---
{{ range $key, $value := . -}}
{{- if or
(eq $key "author")
(eq $key "date")
(eq $key "tags")
-}}
{{- $key }}: {{ $value }}
{{ end -}}
{{ end -}}
feed:
{{ range $key, $value := . -}}
{{- if and
(ne $key "author")
(ne $key "content")
(ne $key "date")
(ne $key "tags")
-}}
{{ print " " }}{{- $key }}: {{ $value | jsonify }}
{{ end -}}
{{ end -}}
---
{{ $content := .content }}
{{- $content = replace $content "{" "{" -}}
{{- $content = replace $content "}" "}" -}}
{{- $content = replace $content "[" "[" -}}
{{- $content = replace $content "]" "]" -}}
{{ $content }}
{{- $caption := "Image/Picture" -}}
{{- with $content -}}
{{ $caption = $content | truncate 80 "" }}
{{- end }}
{{ with .enclosure -}}
{{- if or
(in . ".apng")
(in . ".avif")
(in . ".gif")
(in . ".jfif")
(in . ".jpeg")
(in . ".jpg")
(in . ".pjp")
(in . ".pjpeg")
(in . ".png")
(in . ".svg")
(in . ".webp")
-}}
![{{ $caption }}]({{ . }} "
{{ $caption }}"
)
{{- end -}}
{{- end }}
|