Favicon not changing to -ok status
Closed this issue ยท 6 comments
Hello everyone,
I am currently experiencing the following bug:
I updated the favicons in the static folder and linked them in the config. Afterwards, I created a new incident (degraded performance) and the favicon changed to -warning
. I resolved the issue but the favicon doesn't change to the -ok
one. (Every incident has resolved
set to true)
I would guess the issue has to lay somewhere in here:
{{ $active := where $incidents "Params.resolved" "!=" true }}
{{ if $major }}
<link rel="icon" href="{{ absURL $favicons }}favicon-danger.ico">
{{ else if $active }}
<link rel="icon" href="{{ absURL $favicons }}favicon-warning.ico">
{{ else }}
<link rel="icon" href="{{ absURL $favicons }}favicon.ico">
If I output $active
it says Pages(1)
. To further investigate I deleted every incident.md and it changed to Pages(0)
and the favicon changed as well. When I readd the .md's the favicon changes to warning again.
Here's the live example: https://status.graphcms.com/
What could be the problem here? Any suggestions?
You can fix it by changing {{ $incidents := where .Site.Pages.ByDate.Reverse "Section" "incidents" }}
(in header.html) to {{ $incidents := where .Site.RegularPages.ByDate.Reverse "Section" "incidents" }}
(as was already done in index.html in 6dd1d6a). No idea what the one non-regular-page is, but there you go. I'd open a PR but not sure if anyone is looking at this project.
Oh yeah, that was the issue! Thank you very much ๐
If you wouldn't mind reopening, I'd leave this issue open until it is fixed in this repo :)
pretty sure this was merged.
It is not fixed in current master. As I said above in #47 (comment) it was fixed in index.html:
but is not currently fixed in header.html:
ok I misunderstood. this is now equal.