USRSE / usrse.github.io

US RSE umbrella web page
https://us-rse.org
28 stars 82 forks source link

Web site expiry timing for events #540

Closed christophernhill closed 3 years ago

christophernhill commented 3 years ago

@vsoch and @cosden I noticed during meeting yesterday that event notices seem move to events pages archive at the start of the day they are scheduled for. I could not find the line that triggers this - yet. I was thinking it would be good to have them archived at the end of the day?

Do either of you know how the expiry for events trigger works. I looked at the .js in _events and also in .github, but it didn't jump out at me!

I'll keep looking, so no worries if you don't know where it happens.

github-actions[bot] commented 3 years ago

Welcome to us-rse! We are excited that this is your first issue!

vsoch commented 3 years ago

Yep it's just on the page that renders the events - it will no longer show on the date that is the "expires" metadata. So for the international page, the mistake is having the expires date on the same as the event:

---
title: October 2021 International RSE Day Virtual Events
expires: 2021-10-14
event_date: "October 14, 2021"
layout: event
repeated: false
category: virtual-workshop
time:
    - - start: 2021-10-14T15:00:00Z
        end: 2021-10-14T20:45:00Z

---

expires above should have been 2021-10-15.

vsoch commented 3 years ago

And here is the logic, which should handle any format of timestamp that you want:

https://github.com/USRSE/usrse.github.io/blob/b2b3e44a1b38e5add2e99758a74b7780bd5d6695/_layouts/events.html#L15

It also depends on when the site is rendered. So since we had a fix 17 hours ago, that's when the page would have rendered and the event would have been deemed expired. If the event had the next day, it would still be there. If it had a timestamp for the end of the day, it would still have been there.

christophernhill commented 3 years ago

Ha! So putting expires on the day with no time was a bad 👎 idea. Thanks for clarifying 🙏