app.domain.titles¶
ADR file names, filename dates and display-title derivation.
Public API: ADR_FILENAME_RE, is_adr_filename(),
filename_date(), derive_title(), erratum_title().
- app.domain.titles.ADR_FILENAME_RE = re.compile('^\\d{4}-\\d{2}-\\d{2}-(.*)\\.md$')¶
Legacy discovery pattern for ADR filenames (applied to the basename).
- app.domain.titles.is_adr_filename(name)¶
Tell whether a file name matches the legacy ADR discovery pattern.
- app.domain.titles.filename_date(name)¶
Extract the date prefix of an ADR file name.
- app.domain.titles.derive_title(explicit, body, filename)¶
Choose the display title: frontmatter, first H1, then filename.
- app.domain.titles.erratum_title(section, filename)¶
Build the fallback title of an erratum without an explicit title.