What's on this page
Schedule the publication of a page
With the schedule variable, a page can be written in advance and published later, or removed from the site after a given date.
Publish a page at a date
The page is published only if the build date is on or after the publish date:
---
title: Product launch
schedule:
publish: 2026-11-15
---
Unpublish a page after a date
The page is published only if the build date is before the expiry date. As a date without time means midnight, the page is already unpublished on the expiry day itself (add a time, e.g. 2026-08-31 23:59:59, to keep it during that day):
---
title: Summer sale
schedule:
expiry: 2026-08-31
---
Rebuild the site regularly
A static site doesn’t change by itself: the schedule is evaluated at build time. A page planned for November 15 will appear only after a build that runs on or after that date.
To make it automatic, rebuild the site every day. For example, with GitHub Pages, add a schedule trigger to the on section of your workflow:
# .github/workflows/build-and-deploy.yml
on:
push:
branches: [master, main]
schedule:
- cron: '0 6 * * *' # every day at 6:00 UTC
workflow_dispatch:
On public repositories, GitHub disables scheduled workflows after 60 days without activity in the repository.
Most Jamstack platforms provide a similar feature (scheduled builds or build hooks triggered by a cron job).