Closed blu3id closed 6 years ago
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
The nine million files you've changed are too much for Github PR review :)
{% assign current_time = site.time | date: "%s" | to_integer %}
{% assign sorted = site.events | sort: 'date' | reverse %}
{% for post in sorted %}
{% assign start = post.date | date: "%s" | plus: 86400 | to_integer %}
{% unless start >= current_time %}
@blu3id can you talk me through the plus 24hours there.... It's supposed to appear in previous at midnight on the Sunday ?
(My apologies - closure was clicking close and comment instead of comment)
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
@davidmiller Yes this is a dirty, filthy hatchet job of a hack on Jekyll on that page, which unsurprisingly you have found an error in despite my testing. This is because of edge cases it should probably be adding x2 days (172800).
Basically I need to fix this - I can't directly use post.end_date because this can sometimes be text in upcoming event.... so we can either change to 172800 which assumes all Hackdays are 2 days long? or I can pile further hatchet job logic in.... or do nothing as it just means event will also display as previous event on Saturday midnight while still being upcoming.
From @blu3id in a thread elsewhere:
And obv. this display logic is at site build time anyway so unless the site is updated over the weekend nothing happens.
You know, I had in fact forgotten this. Given that I'd be very tempted to just simplify the whole thing and have it be 'upcoming' or 'past' immediately that now is > start_date
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
I'm planning to merge this tomorrow AM FWIW (just in case something goes wrong with deployment and prevents me from leaving the office shortly)
My only thoughts with that were it may be that edits happen over the weekend and we want the current/upcoming event to stay on the homepage?
Edit: Nevermind. Thinking this through upcoming logic is separate (and equally as hatchet) to this list. Agree and will add change when not mobile.
Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh
Shamelessly stolen from the
README.md
:This PR supersedes @DeckOfPandas #232 because of merging issues and :waves-hands: magic staging only works from PRs from branches on the repository.
This should be a drop-in replacement for the current site i.e stuff that is accessible and linked on the current site should have been copied over. However many eyes checking would be appreciated, the biggest risks for broken bits and changes are:
If all works as intended there should be a link to a staging version of the site in the comments below.