HammeriteManualPage

Editor. Inherits RefCounted

One page of the manual: its front matter, its headings and its markdown.

path is where the page sits in the manual's virtual tree, <section>/<page>.md, which is what links name; file is where it was read from.

Properties

TypeNameDefault
Stringpath""
Stringfile""
Stringtitle""
intorder0
PackedStringArraykeywordsPackedStringArray()
HammeriteManualPage.Heading[]headings[]
Stringbody""
Stringplain_text""
PackedStringArrayproblemsPackedStringArray()
intmodified0

Methods

ReturnsMethod
HammeriteManualPageload_file(page_path: String, page_file: String) static
HammeriteManualPageparse(source: String, page_path: String, page_file: String = "") static
Stringanchor_for(heading_text: String) static
Stringplain(markdown: String) static
boolis_table_rule(line: String) static
PackedStringArrayanchors()
boolhas_anchor(anchor: String)
StringNamesection_id()

Property descriptions

path

var path: String = ""

Where the page sits in the manual, <section>/<page>.md: what links name.

file

var file: String = ""

The file it was read from.

title

var title: String = ""

Its front matter's title.

order

var order: int = 0

Where it stands in its section, lowest first after the index page.

keywords

var keywords: PackedStringArray = PackedStringArray()

Its front matter's keywords, for search.

headings

var headings: HammeriteManualPage.Heading[] = []

Its headings, in order.

body

var body: String = ""

The markdown after the front matter.

plain_text

var plain_text: String = ""

The body without markup, for search.

problems

var problems: PackedStringArray = PackedStringArray()

What is wrong with the page's format, one line each.

modified

var modified: int = 0

The file's modification time when it was read, to notice an edit.

Method descriptions

load_file()

static func load_file(page_path: String, page_file: String) -> HammeriteManualPage

Undocumented.

parse()

static func parse(source: String, page_path: String, page_file: String = "") -> HammeriteManualPage

Undocumented.

anchor_for()

static func anchor_for(heading_text: String) -> String

The anchor a heading is linked by: lowercase, spaces to hyphens, punctuation dropped. The same rule as GitHub's, so a link works on a website unchanged.

plain()

static func plain(markdown: String) -> String

Inline markdown as the words it shows.

is_table_rule()

static func is_table_rule(line: String) -> bool

Whether line is the row under a table's header, |---|:--|.

anchors()

func anchors() -> PackedStringArray

Undocumented.

has_anchor()

func has_anchor(anchor: String) -> bool

Undocumented.

section_id()

func section_id() -> StringName

Undocumented.

class Heading

One of a page's headings.

Properties

TypeNameDefault
intlevel0
Stringtext""
Stringanchor""

Property descriptions

level

var level: int = 0

1 for #, 2 for ## and so on.

text

var text: String = ""

As written, without the hashes.

anchor

var anchor: String = ""

What a link names it by: page.md#anchor.

Hammerite 1.0 · built from a6dd634, 2026-10-10