THE GITHTML FIELD GUIDE
Understand Markdown front matter before copying a document
Front matter is a metadata convention interpreted by a publishing tool, not a universal guarantee of Markdown. Check the generator's schema and delimiters before adding fields. Keep essential reader information in the visible document when needed, because another renderer may show the metadata as text, ignore it, or interpret its boundary differently.
Identify which tool owns the metadata
A title field in one project can control page navigation; the same field in another may do nothing. Locate the generator configuration or content schema rather than assuming a familiar YAML block is enough. Record which fields are required, optional, or ignored. Distinguish author-facing identifiers from public labels and routing fields. Changing a title may be cosmetic, while changing a slug can affect incoming links. If the source is intended for both a repository README and a generated site, decide deliberately which metadata is acceptable on each surface. The file extension alone does not define the publishing contract.
Validate the boundary and the values
Use a small fixture containing front matter, a heading, and one paragraph. Confirm that the metadata terminates where expected and that the first content line remains body text. Quote values when the format requires it, especially strings that could be mistaken for another YAML type or contain structural punctuation. Do not invent fields such as private or unpublished and assume they restrict access; publication behavior must come from a documented tool feature. The sample below is illustrative and only works as intended in a generator configured to understand its keys. Validate it against that project's schema before adopting it.
---
title: "Sample configuration guide"
description: "A verified example for the sample service."
---
# Configuration guideReview metadata and visible content together
Compare the page title, navigation label, route, and any displayed date with the source values. A successful build does not guarantee that an unknown field was used. Test a deliberately distinctive harmless title to see where it appears, then replace it with the final wording. If another tool exports the document to HTML, inspect whether metadata becomes a visible header, hidden metadata, or discarded information. Keep version and status visible when readers need them to interpret the page. Treat publication controls and access controls as separate concerns, and verify each through the actual system responsible for enforcing it. When importing an outside document, review its metadata before the body. A copied route, draft flag, or language value can alter publication behavior even when the visible article appears entirely appropriate.
- Find the generator's documented schema before copying metadata from another project.
- Test where a distinctive title value appears and whether unknown keys cause diagnostics.
- Check routing changes separately from cosmetic title edits.
- Never use an undocumented metadata field as a confidentiality or publication control.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.