module

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 (or yes, 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 expires date 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

excluded?(post : Markdown::File) : String | Nil

Returns nil if the post should be built, or the reason it is excluded.

Source
include_drafts=(include_drafts : Bool)
Source
include_drafts?
Source
include_future=(include_future : Bool)
Source
include_future?
Source