Skip to main content

compose_default

Function compose_default 

Source
pub fn compose_default(
    store: &Store,
    type_: &str,
    frontmatter: &Frontmatter,
    body: &str,
) -> Result<String>
Expand description

Compose a deterministic default summary for a file from its type, frontmatter, and body. Dispatches to the per-type composer; unknown/custom types fall back to the first non-heading paragraph of the body. The result is always single-line and ≤ MAX_SUMMARY_LEN chars.

store is passed because some composers resolve a wiki-link to read a related file’s field (e.g. contact resolves company to the company’s name).