Cherry.Content.Document (cherry v0.5.0)

Copy Markdown View Source

A content file travelling through the pipeline: parsed, not yet emitted.

meta holds schema-validated frontmatter (atom keys). body is the raw source body; html is filled by the transform stage. raw? marks bare .html pages that bypass validation, transform, and layout entirely — the escape hatch for hand-authored files.

Summary

Functions

Output-relative URL for an output path: about/index.htmlabout/.

Types

t()

@type t() :: %Cherry.Content.Document{
  body: String.t(),
  collection: String.t(),
  html: String.t() | nil,
  meta: map(),
  path: String.t() | nil,
  raw?: boolean(),
  source: String.t(),
  url: String.t() | nil
}

Functions

rel_url(path)

@spec rel_url(String.t()) :: String.t()

Output-relative URL for an output path: about/index.htmlabout/.