So as you may already know or have guessed, this blog is built using Hugo, and is hosted on GitLab! There’s documentation on this already, so I won’t rehash that2. No, I’m here to talk about posting, in the future.
Why would you want to set a date in the future? Maybe you know you’ll be away and unable to post for a few weeks, or you’re just feeling productive and write a heap of content. Instead of overwhelming your readers with a tower of posts released on the same day, you could stagger that content over several weeks.
But here’s the thing. With the default configuration following the documentation linked earlier, the blog only builds when the pipeline runs, which means you making a new commit to the
When I’m away, I’m away! 😎 🌴 I can’t be triggering these builds!
Happily, GitLab lets you set timer. They’re called pipeline schedules, and you can either set one with the ever powerful cron syntax or one of their default options. I’m using
0 20 * * * in the UTC timezone, meaning about 4am local.
So I can just write, set the date I want and make sure to remove the draft status and… fresh posts for the people when they rise and shine! ☕