Initial Commit
[ancientarts.git] / hugo / themes / ancientarts / layouts / _default / single.json
1 {{ $iconRoot := cond (not $.Params.iconroot) "" $.Params.iconroot }}
2 {{- $sp := .Site.GetPage "section" .Section }}
3 {{- $sh := cond (or (not $sp.Params.header) (not (fileExists (printf "static/%s" $sp.Params.header)))) (cond (or (not .Site.Home.Params.header) (not (fileExists (printf "static/%s" .Site.Home.Params.header)))) "/img/speedy.png" .Site.Home.Params.header) $sp.Params.header }}
4 {{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
5 {
6 "version" : "https://jsonfeed.org/version/1",
7 "title" : "{{ .Site.Title }} :: {{ .Title }}",
8 "description" : "{{ if not .Description }}{{ .Title }}{{ else }}{{ .Description }}{{ end }}",
9 "home_page_url": "{{ .Site.BaseURL }}",
10 "feed_url": "{{ .Site.BaseURL }}/index.json",
11 "icon" : "{{ printf `%s%s` .Site.BaseURL $ph }}",
12 "favicon" : "{{ printf `%s%s/favicon-32x32.png` .Site.BaseURL $iconRoot }}",
13 {{- with .Site.Author }}
14 "author" : {
15 "name" : "{{ .name }}",
16 "url" : "{{ .url }}",
17 "avatar" : "{{ .avatar }}"
18 },
19 {{- end }}
20 "items" : [
21 {
22 "title" : {{ jsonify .Title }},
23 "date_published" : "{{ .Date }}",
24 {{- if not .Lastmod }}
25 "date_modified" : "{{ .Date }}",
26 {{- else }}
27 "date_modified" : "{{ .Lastmod }}",
28 {{- end }}
29 "id" : "{{ .Permalink }}",
30 "url" : "{{ .Permalink }}",
31 {{- with .Params.author }}
32 "author" : {
33 "name" : "{{ . }}"
34 },
35 {{- end }}
36 "content_html" : {{ jsonify .Content }},
37 "summary" : {{ jsonify .Summary }},
38 "tags" : {{ jsonify .Params.tags }}
39 }
40 ]
41 }