Skip to content

Documentation Metadata

Documentation descriptions are generated during the MkDocs build by docs/hooks/metadata.py. This is deterministic processing of existing documentation, not an AI request or a second store of manually maintained API descriptions.

Source ownership

Page Maintained source Generated description
API type C# XML documentation, rendered by DefaultDocumentation Qualified API/version identity followed by the introductory summary
API index without prose Package, namespace and version identity A truthful reference identity, without invented behavior
Authored guide Markdown introduction or explicit frontmatter Page title and introduction, unless an explicit description is supplied
Homepage Explicit frontmatter or the configured project description The authored description or existing project description

When changing a public API, maintain its XML contract. The API generator carries that prose into Markdown, and MkDocs derives metadata from the introductory paragraph. It does not select code, inheritance listings, tables or later member remarks as substitutes for a missing type summary.

For an authored guide, an explicit description takes precedence:

---
description: Register services and configure the application container.
---

Keep an explicit description consistent with the guide, or remove it to use the generated introduction. Blank descriptions use the generated default; non-string values fail the build. Code blocks, notes, images and tables are not introductory prose.

Generated summaries are shortened at word boundaries to a target of 240 characters. An indivisible identifier longer than that target is preserved rather than cut. Explicit descriptions are not truncated or replaced, apart from whitespace normalization.

Rendering and checks

The same description supplies the ordinary HTML, Open Graph and Twitter metadata. Escaping is applied only to the rendering context because MkDocs templates do not autoescape by default. Source metadata remains plain text for other build hooks, including structured data and llms.txt, and the metadata hook returns rendered page content unchanged. JSON-LD serialization escapes HTML-sensitive delimiters without changing the decoded description.

API pages also emit one APIReference JSON-LD document through docs/hooks/schema.py. Its name reuses the qualified, version-aware page title; its @id and url identify the canonical documentation page, not the package search. Its description consumes the same plain-text metadata as the HTML and social tags. There is no separate API-description store or semantic inference from symbol names. The generic SoftwareSourceCode record is not emitted for a reference document, and non-API markup is unchanged.

API canonical URLs omit the terminal directory slash to match the public documentation host. The metadata hook sets this shared page identity before HTML, social metadata, JSON-LD and sitemaps are rendered. Internal directory URLs still support relative asset resolution; non-API URL conventions are unchanged.

The hosted Documentation metadata workflow builds the Injection project and its dependencies, passes their compiler XML and assemblies through DefaultDocumentation, and builds the resulting Markdown with MkDocs. It compares the compiled Syringe XML summary with generated Markdown, visible HTML and JSON-LD, and checks every generated API page for one matching reference document. A bounded one-day artifact retains the compiler XML, generated Markdown and rendered sample for inspection. Full source CI runs the same checks against its existing compiler and site output, covering every API package without another build or documentation-generation pass.

The same checks exercise explicit-description precedence, API/version identity, introductory-prose selection, safe escaping and unchanged titles/headings. These are mechanical contracts; reviewers still need to verify that source prose accurately describes the API or guide. JSON-LD correctness does not establish Google rich-result eligibility or a ranking benefit.

Published versions

Development documentation uses this metadata and structured-data policy when regenerated. Releases apply it when their API Markdown is built. Previously published stable and archived HTML is intentionally preserved by the publication workflows, so updating a build hook does not rewrite those frozen snapshots.

Backfilling descriptions in frozen snapshots is a separate reviewed metadata-only maintenance operation. It must derive descriptions from that version's published content and preserve everything outside the description metadata. Never edit the final generated files by hand or use current API behavior to describe an older version.