From 6dd1d6ab0576caa315edce0615aceff51a576d72 Mon Sep 17 00:00:00 2001 From: steveoh Date: Tue, 29 Aug 2017 09:31:34 -0600 Subject: [PATCH 1/2] use regular pages to not pick up all page types --- site/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/layouts/index.html b/site/layouts/index.html index 0b7c045..c8060c6 100644 --- a/site/layouts/index.html +++ b/site/layouts/index.html @@ -1,6 +1,6 @@ {{ partial "header" . }} -{{ $incidents := where .Site.Pages.ByDate.Reverse "Section" "incidents" }} +{{ $incidents := where .Site.RegularPages.ByDate.Reverse "Section" "incidents" }} {{ $active := where $incidents "Params.resolved" "!=" true }} {{ partial "systems" (dict "content" . "incidents" $active) }} From 977be66adc3327b4a3df8601c07add91892180ea Mon Sep 17 00:00:00 2001 From: steveoh Date: Tue, 29 Aug 2017 09:32:11 -0600 Subject: [PATCH 2/2] default severity to under maintenance to guard nils --- site/layouts/partials/incident.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/site/layouts/partials/incident.html b/site/layouts/partials/incident.html index 3879b84..baf8baf 100644 --- a/site/layouts/partials/incident.html +++ b/site/layouts/partials/incident.html @@ -6,9 +6,10 @@
{{- .Content -}}
- {{- $alert := index .Site.Data.severity.alerts .Params.severity -}} + {{- $severity := .Params.severity | default "under-maintenance" -}} + {{- $alert := index .Site.Data.severity.alerts $severity -}}

- {{ index .Site.Data.severity.descriptions .Params.severity }} + {{ index .Site.Data.severity.descriptions $severity }}