blob: e17e31e7642b81b1e051a0e00e4e5037100354e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{{- $articles := where .Site.RegularPages "Section" "articles" -}}
{{- $articles = $articles.ByDate.Reverse -}}
[
{{- range $index, $article := $articles -}}
{
"title": {{ $article.Title | jsonify }},
"url": {{ $article.Permalink | jsonify }},
"date": {{ $article.Date.Format "Jan 02, 2006" | jsonify }},
"summary": {{ substr ($article.Summary | plainify) 0 160 | jsonify }}
}
{{- if ne (add $index 1) (len $articles) }},{{ end }}
{{- end }}
]
|