Countdown
Generate a little buzz for your project by adding a countdown widget to your page. The timer will use the current datetime and your specified datetime to determine how much time is left in the countdown. If the time runs out, the countdown will stop (at '0d 0h 0m 0s').
Options
The following options are supported by this widget.
- launchDate
Specify the exact time that the countdown should end, as a UTC datetime value.
ex: "2024-10-09T05:00:00.000Z"
- config
(OPTIONAL) A copy of the config hash. See the snippet that follows. This option reduces the number of times the site configuration values are queried, speeding up the process of building the site.
Usage
There are several ways to incorporate this widget into your pages.
Inline
If you have more than one countdown target datetime, you can specify each directly on the widget.
Page Metadata
If you want to have multiple countdown widgets on the same page, you can set the target datetime in the page's metadata.
Site Config
If the countdown widget is used across the site in multiple places, you can store the target datetime in the site config.
In the 'config.yml' file:
In the 'my-page.md' file:
In the 'config.yml' file:
In the 'my-page.md' file: