owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.35k stars 227 forks source link

Enable publication dates in the future and scheduled publishing #3714

Closed danyx23 closed 1 week ago

danyx23 commented 1 week ago

Context

In the past, our site had a relatively slow publishing rhythm where articles were written over weeks and months and then published at some point. Even in our full team our informal publishing schedule rarely had more than 2 or 3 pieces of writing go out within a week.

With data insights this has changed and we now often publish a piece of content a day or more often. Currently, this means that someone has to press publish on the gdoc in question at the time when it should be published. We want to change this now so that any gdoc can be published with a publication date in the future.

Details

The basic version of this should be very simple to do - just filter out all content during baking where the publication date is in the future.

This very simple version would rely on other content bakes occurring on the day of publication - e.g. if a post is published on August 1 with a publication date of August 5, then some kind of content bake would have to be triggered on August 5 for that piece of content to become visible. While some kind of content bake is triggered on most days (because of chart updates or similar), on bank holidays and such this is not guaranteed. It would thus be a nice first addition to add a daily buildkite step or something like that that guarantees that we do at least one content bake a day.

The other thing that would be useful is a future publishing schedule. This could be a read only view in the admin where you see which pieces of content will be published in the future, sorted by date (maybe a table with one row per piece of content going out that links to the gdoc admin of that content). This would make it easy to spot if there are e.g. multiple DIs scheduled for one day.

Ed is the person who will most benefit from this feature so he is a good person to talk to for questions regarding details.

Open questions

danyx23 commented 1 week ago

It might be worthwhile to consider #3228 a bit when implementing this - i.e. which timezone do we consider for these decisions in?