Lifecycle
Content lifecycle management for posts (issue #46)
A post can be excluded from the build because it is:
- a draft: it has
draft: true(oryes,on,1) in its front matter, unless the build was started with--drafts - in the future: its date is after the current time, unless the
build was started with
--future - expired: it has an
expiresdate in its front matter (anything DateUtils can parse, including natural language dates like "2026-12-31" or "next week") and that date has passed
The flags live here because they are set by the build/auto commands before tasks are created, and consulted during Posts.enable_from_scan.
Constants
TRUTHY = {"true", "yes", "on", "1"}
Truthy front-matter values for the draft flag
Class methods
Returns nil if the post should be built, or the reason it is excluded.
include_drafts?
Sourceinclude_future?
Source