diff options
author | Mantas Vilčinskas <hi@mnts.lt> | 2023-12-01 16:06:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 16:06:56 +0200 |
commit | 627b76ac2f904edadc69ee0e7b8776078bb73fc0 (patch) | |
tree | 7cfd3170dee0ba90ee32caf3e7f9412cb439e292 /layouts/index.json | |
parent | ed2321eb20b63f8e24af4aaf0df344e5b78de8f4 (diff) | |
parent | 1674bfc8509def65ea62e215450d009516f183e5 (diff) |
cState v5.6.0 #300
cState v5.6.0
Diffstat (limited to 'layouts/index.json')
-rw-r--r-- | layouts/index.json | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/layouts/index.json b/layouts/index.json index a7ce134..0067dc3 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -1,6 +1,6 @@ {{ $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": "index", - "cStateVersion": "5.5.2", + "cStateVersion": "5.6", "apiVersion": "2.0", "title": "{{ .Site.Title }}", "languageCodeHTML": "{{ .Site.LanguageCode }}", @@ -17,6 +17,20 @@ } {{ end }} ], + {{ $informationals := where $incidents "Params.informational" "=" true }}{{ $pinnedIssues := where $informationals "Params.pin" "=" true }} + {{ if not $pinnedIssues }} + "pinnedIssues": []{{ else }} + "pinnedIssues": [{{ range $i, $e := $pinnedIssues }}{{ if $i }},{{ end }} + { + "is": "issue", + "title": "{{ .Title }}", + "createdAt": "{{ .Date }}", + "lastMod": "{{ .Lastmod }}", + "permalink": "{{ .Permalink }}", + "affected": [{{ range $i, $e := .Params.Affected }}{{ if $i }}, {{ end }}"{{ . }}"{{ end }}], + "filename": "{{ .File.LogicalName }}" + }{{ end }} + ]{{ end }}, "systems": [ {{ range $i, $e := .Site.Params.systems }}{{ if $i }},{{ end }} { |