Skip to main content

Module schema

Module schema 

Source
Expand description

User-facing TOML schema (the annotated reference lives at docs/config.toml in the repo).

Every field is Option<T> so “the user didn’t write this” is distinguishable from “the user wrote zero / empty”. The merge step in super::merge collapses preset + user into a concrete super::resolved::ResolvedStyle that the renderer consumes.

Structs§

AdmonitionConfig
Per-kind admonition styling. The top-level [admonition] block flattens a BlockConfig so shared shape fields (padding, margins, font defaults) can be set in one place; the per-kind sub-blocks layer colour and label overrides on top.
AdmonitionKindConfig
Per-kind admonition overrides. Shape comes from the parent [admonition] defaults; this block layers colour (accent_color drives the icon + left border) and an optional explicit label override on top.
BlockConfig
The workhorse style block. Applies to any flowable block: paragraph, heading, code block, blockquote, list, table cell, etc.
BorderConfig
BorderSide
Color
DocumentConfig
HeadingsConfig
ImageConfig
InlineConfig
Subset of BlockConfig for true inline runs (code_inline, link): block-level fields like padding/border/text_align/ line_height/margin_* don’t make sense for inline.
ListStyleConfig
ListsConfig
MathConfig
Styling for typeset math. align / margin_* apply to display ($$…$$) blocks; scale multiplies the body font size for display math (inline $…$ always tracks the surrounding text size); color is the math ink (defaults to the paragraph color).
MetadataConfig
PageConfig
PageFurnitureConfig
RuleConfig
SecurityConfig
Operator-controlled limits on what a document is allowed to pull in while rendering. These exist for callers who render untrusted markdown: a document can name any local path in an image reference, and without a root to confine it to, the renderer will read it. The document itself can never set these — frontmatter is metadata-only, so this block comes solely from the operator’s config.
Sides
TableConfig
TitlePageConfig
TocConfig

Enums§

BorderStyle
FontStyleVariant
FontWeight
ImageAlign
Orientation
PageSize
TextAlignment