Skip to main content

Module markdown

Module markdown 

Source

Structsยง

MarkdownBuilder
Renders a directory of Markdown files (.md) to standalone HTML documents.
MarkdownBuilderConfig
Configuration for MarkdownBuilder.

Constantsยง

TEMPLATE_MARKDOWN
The default Tera template used to wrap rendered Markdown content in a complete HTML5 document. Exposed as a pub const so that abbaye dump-theme can write it to .abbaye/theme/markdown.html.j2.
TERA_NAME ๐Ÿ”’
Name under which the template is registered inside the Tera instance.
THEME_FILENAME ๐Ÿ”’
Filename looked up inside .abbaye/theme/ at runtime.

Functionsยง

build_directory ๐Ÿ”’
collect_md_files ๐Ÿ”’
Walk dir for .md files, honouring .gitignore rules (via the ignore crate). Returns paths in a stable, sorted order so output is reproducible.
collect_referenced_files ๐Ÿ”’
Parse md for local link and image targets that are not other Markdown files, resolve them relative to md_pathโ€™s parent directory, and return those that exist as files within input_dir.
default_recursive ๐Ÿ”’
dir_name_string ๐Ÿ”’
Extract the directory name as an owned String, falling back to "html".
extract_title ๐Ÿ”’
Scan a Markdown string for the first heading of any level and return its plain-text content. Used to populate the <title> element.
file_stem_string ๐Ÿ”’
Extract the file stem as an owned String, falling back to "Document".
load_tera ๐Ÿ”’
Load the Tera instance for this builder invocation.
render_markdown ๐Ÿ”’
Convert a Markdown string to an HTML fragment.
render_template ๐Ÿ”’
Render the Tera template with the given title and HTML content.