The simplest guide to scheduling posts for your Hugo blog
Have you ever wanted to schedule your Hugo blog posts in advance? To make sure that your readers get them at the exact time you planned? If so, you’re in luck.
I had the same problem, and I found a great solution that works like a charm. It’s a combination of a few different tools, but the most important one is PR Scheduler.
PR Scheduler is an extension for GitHub that makes it possible to schedule pull requests. It works by letting you comment on a PR with a special command, like @prscheduler DATE
(for example, @prscheduler 20/02/2023T10:20
). When the specified date comes, the PR is automatically merged, and the changes become part of the repository.
So how does this help with scheduling blog posts? Well, I store my posts in a GitHub repository. Cloudflare Pages is my platform, and it’s set up to continuously monitor the repository for changes. Whenever there’s a new commit, it regenerates the blog’s source code.
Here’s how I use PR Scheduler and Cloudflare Pages together to schedule my blog posts:
- I create a pull request with the content of my post.
- I comment on the PR with the
@prscheduler DATE
command. - PR Scheduler takes care of merging the PR at the specified date.
- Cloudflare Pages notices the change and regenerates the blog’s source code.
- The post is published at the selected date.
It’s a simple but effective system. I can easily schedule my blog posts weeks or months in advance without having to worry about manually merging the PRs or triggering the regeneration.
If you’re looking for an efficient way to schedule blog posts, I highly recommend giving PR Scheduler and Cloudflare Pages a try. It’s a great solution that works well and is easy to set up. Good luck!