-
Notifications
You must be signed in to change notification settings - Fork 99
Description
TL;DR
Problem: The job sections in all the newsletters are currently not static information and will eventually become out of sync with the emailed versions we share with the community.
Partial Solution: Update {% assign today = 'now' | date: "%Y-%m-%d" %} to be the date of newsletter release, not 'now' (which is changing on each build.)
Details
I've been noticing these two warnings from liquid about expected values:
Liquid Warning: Liquid syntax error (line 495): Expected end_of_string but found pipe in "job.expires | date: "%Y-%m-%d" >= today" in /home/circleci/repo/_posts/newsletters/2025-04-28-newsletter.md
Liquid Warning: Liquid syntax error (line 1229): Expected end_of_string but found pipe in "job.expires | date: "%Y-%m-%d" >= today" in /home/circleci/repo/_posts/newsletters/2025-06-30-newsletter.mdAfter looking a little more closely, I think we may want to update the way these two specific checks are done. Above these is very similar check that filters the jobs by expired date, which I believe can just be used.
{% assign expires_formatted = job.expires | date: "%Y-%m-%d" %}
{% if expires_formatted >= today %}That being said, I realized that every time we regenerate the website, we are remaking these newsletter. And because we are comparing to today which is assigned as {% assign today = 'now' | date: "%Y-%m-%d" %}, the newsletters on the website will eventually be different than what we are sending out to the community via email (since the latter is static and the former has a new today every time we build the site.) It seems the today value should really be the date of the newsletter being released. Furthermore, since the jobs.yml file can also be different, as jobs do get removed from here, the job sections could still end up being "wrong" on every rebuild of the website.
Since "recent jobs" and the job board in general is transient in nature, do we care to address this? Should we find a way to more permanently add jobs to the newsletter so that the newsletters will always be accurate for historical purposes? I could see this being beneficial for analysis in the future, to monitor how our job board changes over time.