By default, Jekyll doesn’t display posts with future dates. Sometimes we want to test them before publishing, and for that reason there is a plain solution.
Let’s start by saying you need to test a post with tomorrow’s date, for example:
When previewing post locally, you’ll get the following message:
Skipping: _posts/2022-01-11-docker-vs-podman.md has a future date.
The solution is quite simple. Just add the –future flag. Full command(s) below:
jekyll serve --future
bundle exec jekyll serve --future
Regarding the production environment (GitHub Pages for instance), add the following line in your
_config.yml file found in the root directory:
As a next step, if you really don’t wanna bother with all of the above, a simple CI/CD cron job should do the job, by deploying every midnight in the preffered timezone by the website / blog owner.
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on telegram.