class

Hwaro::Models::Section

Inherits Hwaro::Models::Page / Reference / Object

Constructors

new(path : String)
Source

Instance methods

add_subsection(section : Section)

Add a subsection

Source
all_pages(include_drafts : Bool = false) : Array(Page)

Get all pages including from subsections (recursive)

Source
cascade

Front-matter [cascade] table: default values inherited by descendant pages and sections (the section itself is not affected). Deeper cascades override shallower ones; a page's own front matter always wins.

Source
cascade=(cascade : Hash(String, ExtraValue))

Front-matter [cascade] table: default values inherited by descendant pages and sections (the section itself is not affected). Deeper cascades override shallower ones; a page's own front matter always wins.

Source
generate_feeds
Source
generate_feeds=(generate_feeds : Bool)
Source
page_template

New: Page template - default template for pages in this section

Source
page_template=(page_template : String | Nil)

New: Page template - default template for pages in this section

Source
pages

Pages in this section

Source
pages=(pages : Array(Page))

Pages in this section

Source
paginate

Section-specific Front Matter Properties

Source
paginate=(paginate : Int32 | Nil)

Section-specific Front Matter Properties

Source
paginate_path

New: Paginate path - custom path pattern for pagination (e.g., "page", "p")

Source
paginate_path=(paginate_path : String)

New: Paginate path - custom path pattern for pagination (e.g., "page", "p")

Source
pagination_enabled
Source
pagination_enabled=(pagination_enabled : Bool | Nil)
Source
pagination_url(page_number : Int32) : String

Generate pagination URL for a specific page number

Source
reverse
Source
reverse=(reverse : Bool | Nil)
Source
sort_by
Source
sort_by=(sort_by : String | Nil)
Source
subsections

New: Subsections - child sections

Source
subsections=(subsections : Array(Section))

New: Subsections - child sections

Source
transparent
Source
transparent=(transparent : Bool)
Source