Plombir::Frontmatter::Document
A parsed document: raw YAML values plus the Markdown body.
Derived metadata (title, layout, date, tags, draft?)
applies the roadmap ยง11.5 defaults โ see ADR-002. The source file
and frontmatter block_lines are kept so value errors can report
an exact file:line like every other Plombir diagnostic.
Constructors
Instance methods
Returns categories as a normalized list (categories: plus
singular category: alias, merged deduped โ see ADR-008).
doc.categories # => ["guides", "news"]
Returns the page date: explicit date: (as YYYY-MM-DD or
RFC3339, quoted or not), else default (the caller passes the
file mtime โ see ADR-002), else nil.
doc.date(File.info(path).modification_time) # => 2026-09-13 00:00:00Z
Returns whether the page is a draft (draft: true).
Underscore paths are handled by Plombir::Content.discover.
doc.draft? # => false
1-based file line of the key: entry, or 1 when unknown.
Public for violation reporting (Schema points at the key).
Returns the paginated collection name (paginate_collection:),
defaulting to "posts" (see ADR-007).
doc.paginate_collection # => "posts"
Returns the paginated URL pattern (paginate_path: with :num),
or nil when the <page_url>page/:num/ default applies.
doc.paginate_path # => "/blog/page:num/"
Returns items per page for paginated listings (paginate: 5),
or nil when the page is not paginated (see ADR-007).
doc.paginate_per_page # => 5
Returns tags as a normalized list: tags: plombir and the
list form both work; items are stripped and empties dropped;
a missing key means no tags.
doc.tags # => ["plombir", "hello"]