jlelse
/
Indieroad
Archived
1
Fork 0
This repository has been archived on 2020-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
Indieroad/layouts/_default/list.mentions.json

28 lines
877 B
JSON

{{- $mentions := .Site.Data.mentions -}}
{{- $allmentions := slice -}}
{{- range $key, $pagementions := $mentions -}}
{{- range $pagekey, $mention := $pagementions -}}
{{- if $allmentions -}}
{{- $allmentions = $allmentions | append $mention -}}
{{- else -}}
{{- $allmentions = (slice $mention) -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- $allmentions = sort $allmentions "date" "desc" -}}
{
"version": "https://jsonfeed.org/version/1",
"title": "{{ T "interactions" }} {{ .Site.Title }}",
"feed_url": "{{ .Permalink }}",
"items": [
{{ $delimiter := "" -}}
{{- range first 30 $allmentions -}}
{{- $delimiter -}}{
"id": "{{ .source }}",
"url": "{{ .source }}",
"date_published": "{{ dateFormat "2006-01-02T15:04:05-07:00" .date }}"
}
{{- $delimiter = "," -}}
{{- end -}}
]
}