hugo, cron, publishdate, and auto-publishing blogposts
If you see this - and it is an “if” at this point - then I’ve understood how to use hugo’s publishdate
function correctly.
I think that, as long as I set a publishdate
for some point in the future, and that I do not set the draft
parameter, hugo will publish the post once the publishdate (and time) is met.
So, if I run a cronjob every hour, to run the script which publishes the site, it should pick up this blogpost and publish it.
With a bit of luck, if I’ve got it right, you should see this at about 16:00 on 1st November 2023.
You may also like:
- Moving from htmly to hugo for a static site blog
- Scheduling posts on Mastodon, the hack-y way
- Triggering a remote lamp automatically when I am on a call
- Disabling my ThinkPad's internal camera on boot
- Fixing dropbear ssh Permission denied (publickey) error
- Snikket, a self-contained XMPP distribution
- GSConnect (KDE Connect), WireGuard, and Debian 12 Bookworm
- Unlocking a LUKS-encrypted partition via ssh on Debian 12 Bookworm
- NetworkManager: automatically switch between Ethernet and Wi-Fi
- Fixing sogo's 'incorrect string value' error
- Updating the LUKS key derivation function on Debian
- Backing up to a USB stick automatically via udev
- Fixing espanso incomplete text replacement
- Automating actions in Nautilus (GNOME's file manager) with scripts
- Jabra Evolve2 40 and Debian Linux