aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default/list.json
diff options
context:
space:
mode:
authorMantas Vilčinskas <hi@mnts.lt>2021-02-24 16:29:44 +0200
committerMantas Vilčinskas <hi@mnts.lt>2021-02-24 16:29:44 +0200
commit548fcb9e38409902e12d117c745297e7637a7e67 (patch)
treee9a96ab63d9b41ac1c469587e5b6687909761911 /layouts/_default/list.json
parent96477340dd7d7127ce5a6190e78974ad7a895bea (diff)
API updates, lastmod, NCMS/default config changes, version to 0.80
Diffstat (limited to 'layouts/_default/list.json')
-rw-r--r--layouts/_default/list.json32
1 files changed, 32 insertions, 0 deletions
diff --git a/layouts/_default/list.json b/layouts/_default/list.json
new file mode 100644
index 0000000..f469523
--- /dev/null
+++ b/layouts/_default/list.json
@@ -0,0 +1,32 @@
+{{ $incidents := where .Site.RegularPages "Params.section" "issue" }}{{ $active := where $incidents "Params.resolved" "=" false }}{{ $isNotice := where $active "Params.severity" "=" "notice" }}{{ $isDisrupted := where $active "Params.severity" "=" "disrupted" }}{{ $isDown := where $active "Params.severity" "=" "down" }}{
+ "is": "{{ .Section }}",
+ "title": "{{ .Title }}",
+ "baseURL": "{{ .Site.BaseURL }}",
+ "description": "{{ if .Params.Description }}{{ .Params.description }}{{ else }}{{ end }}",
+ "pages": [{{ range $i, $e := .Pages }}{{ if $i }},{{ end }}{{ if eq .Section "issues" }}
+ {
+ "is": "issue",
+ "title": "{{ .Title }}",
+ "createdAt": "{{ .Date }}",
+ "lastMod": "{{ .Lastmod }}",
+ "permalink": "{{ .Permalink }}",
+ "severity": "{{ .Params.severity }}",
+ "resolved": {{ if .Params.resolved }}true{{ else }}false{{ end }},
+ "informational": {{ if .Params.informational }}true{{ else }}false{{ end }},
+ "resolvedAt": "{{ .Params.resolvedWhen }}",
+ "affected": [{{ range $i, $e := .Params.Affected }}{{ if $i }}, {{ end }}"{{ . }}"{{ end }}],
+ "filename": "{{ .File.LogicalName }}"
+ }
+ {{ else }}
+ {
+ "is": "page",
+ "title": "{{ .Title }}",
+ "createdAt": "{{ .Date }}",
+ "lastMod": "{{ .Lastmod }}",
+ "permalink": "{{ .Permalink }}",
+ "filename": "{{ .File.LogicalName }}",
+ "summary": {{ jsonify .Summary }}
+ }
+ {{ end }}{{ end }}
+ ],
+}