netlify / netlify-statuskit

Netlify StatusKit is a template to deploy your own Status pages on Netlify.
https://www.netlify.com/status-pages/
MIT License
238 stars 41 forks source link

Favicon not changing to -ok status #47

Closed belazer closed 5 years ago

belazer commented 6 years ago

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?

dracos commented 6 years ago

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 6dd1d6ab0576caa315edce0615aceff51a576d72). 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.

belazer commented 6 years ago

Oh yeah, that was the issue! Thank you very much 🙂

dracos commented 6 years ago

If you wouldn't mind reopening, I'd leave this issue open until it is fixed in this repo :)

steveoh commented 5 years ago

pretty sure this was merged.

dracos commented 5 years ago

It is not fixed in current master. As I said above in https://github.com/netlify/netlify-statuskit/issues/47#issuecomment-360931318 it was fixed in index.html: https://github.com/netlify/netlify-statuskit/blob/bfe3c1485ef73d7e809e298bb882407b1d411997/site/layouts/index.html#L3 but is not currently fixed in header.html: https://github.com/netlify/netlify-statuskit/blob/bfe3c1485ef73d7e809e298bb882407b1d411997/site/layouts/partials/header.html#L8

steveoh commented 5 years ago

ok I misunderstood. this is now equal.