Sometimes it could happen you wrote several posts for your blog and you don't want to publish them at the same time, but you would like to schedule them for the next days.

Before approaching this problem, you must know that, by default, Grav immediately publishes all the available pages and posts.

A first attempt to solve this problem could be trying to configure the page published parameter, setting it to false for all the pages you don't want to publish, then manually change that setting when you want to make it available for your audience.

---
    [...]
    published: false
---

This solution works for sure, but you can follow a better approach, by properly configuring the date parameter. In fact Grav does not publish a page until that parameter does not exceed the current time. We can leverage this behavior to precisely schedule the publication of our posts.

For example, if we wrote two posts and we want to publish one today and one in two days, we can configure the first page as follows:

---
    [...]
    date: 07/18/2015 08:00
---

and the second post as follows:

---
    [...]
    date: 07/20/2015 08:00
---

In this way, Grav publish the second page of the July 20, 2015, in the morning at 08.00.

Next Post Previous Post

Related Posts