class

Hwaro::Models::ContentGenerateConfig

Inherits Reference < Object

One [[content.generate]] entry — a declarative rule that materializes each record of a site.data array (disk data/ or [[data.remote]]) into a real content page. This class is the validated config shape; evaluation and page synthesis live in Core::Build::ContentGenerate.

slug/title/body/date/description and each taxonomies value accept either a plain record field name ("sku") or a Crinja template ("{{ item.sku | slugify }}") — a string containing {{ or {% is treated as a template rendered with the record bound to item.

Constructors

new(source : String, section : String, slug : String, title : String)
Source

Instance methods

body

Field-or-template producing the page's markdown body ("" when nil and no body_template).

Source
body=(body : String | Nil)

Field-or-template producing the page's markdown body ("" when nil and no body_template).

Source
body_template

Alternative body source: a template file (from templates/) rendered with the record as item. Mutually exclusive with body.

Source
body_template=(body_template : String | Nil)

Alternative body source: a template file (from templates/) rendered with the record as item. Mutually exclusive with body.

Source
date

Optional field-or-templates for front-matter date / description.

Source
date=(date : String | Nil)

Optional field-or-templates for front-matter date / description.

Source
description
Source
description=(description : String | Nil)
Source
section

Target section: generated pages get paths <section>/<slug>.md, so section listings, [permalinks] patterns, feeds and taxonomies all apply exactly as they do to authored pages in that section.

Source
section=(section : String)

Target section: generated pages get paths <section>/<slug>.md, so section listings, [permalinks] patterns, feeds and taxonomies all apply exactly as they do to authored pages in that section.

Source
slug

Field-or-template producing each page's slug (slugified after evaluation) and title.

Source
slug=(slug : String)

Field-or-template producing each page's slug (slugified after evaluation) and title.

Source
source

Dotted path into site.data naming the record array, e.g. "products" or "products.items".

Source
source=(source : String)

Dotted path into site.data naming the record array, e.g. "products" or "products.items".

Source
taxonomies

taxonomy name => field-or-template. A field that holds an array contributes every element as a term; scalars contribute one term.

Source
taxonomies=(taxonomies : Hash(String, String))

taxonomy name => field-or-template. A field that holds an array contributes every element as a term; scalars contribute one term.

Source
title
Source
title=(title : String)
Source