diff options
| author | 2026-02-10 17:11:24 +0300 | |
|---|---|---|
| committer | 2026-02-10 20:08:10 +0300 | |
| commit | 2ecb959c5b9c2b0750212af0349fd6d4a5c25258 (patch) | |
| tree | 16b3268b7dd825a13d4d8c0eb00007cc7f9a8ac1 /layouts/_default/section.feed.json | |
| download | base-master.tar.gz base-master.tar.bz2 base-master.tar.xz base-master.zip | |
Diffstat (limited to '')
| -rw-r--r-- | layouts/_default/section.feed.json | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/layouts/_default/section.feed.json b/layouts/_default/section.feed.json new file mode 100644 index 0000000..d7d70d0 --- /dev/null +++ b/layouts/_default/section.feed.json @@ -0,0 +1,31 @@ +{ + "version": "https://jsonfeed.org/version/1", + "title": {{ .Site.Title | jsonify }}, + "home_page_url": {{ .Permalink | jsonify }}, + {{ with .OutputFormats.Get "json" -}} + "feed_url": {{ .Permalink | jsonify }}, + {{- end }} + {{- if .Site.Params.author -}} + "author": { + "name": {{ .Site.Params.author | jsonify }} + }, + {{ end -}} + {{- if .Data.Pages -}} + "items": [ + {{ range $index, $element := first 10 .Data.Pages -}} + {{ if $index }},{{end}} { + "title": {{ $element.Title | jsonify }}, + "id": {{ $element.Permalink | jsonify }}, + "url": {{ $element.Permalink | jsonify }}, + "summary": {{ $element.Summary | jsonify }}, + {{- if eq $element.Type "link" -}} + "external_url": {{ $element.Params.link | jsonify }}, + {{- end -}} + "content_html": {{ $element.Content | jsonify }}, + "content_text": {{ $element.Plain | jsonify }}, + "date_published": {{ $element.Date.Format "2006-02-01T15:04:05-0700" | jsonify }} + } + {{- end }} + ] + {{ end -}} +}
\ No newline at end of file |
