SchemaStore / SchemaStore/schemastore
Add: TPS Front Matter (YAML) — Markdown/Quarto front matter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 2.3k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 124
Description
Description of the JSON Schema
YAML front matter for Markdown (.md) and Quarto (.qmd) provides validation and editor hints for titles, authors, dates/timestamps, keywords, and governance fields (stable ID, document type, project, semantic versions, lifecycle status with conditional review timestamp, confidentiality, and passthrough meta tokens). Enumerations are expressed with oneOf + { const, description } for richer tooltips. Conditionals enforce reviewed when status is reviewed, published, or archived.
Schema URL
https://www.schemastore.org/tps-yaml-frontmatter.json
(Canonical, versionless URL. Future updates will revise the canonical file rather than adding frozen, version-locked variants.)
File Patterns (fileMatch)
None by default (front matter is embedded inside many filenames). Users opt-in via a $schema key in their YAML front matter.
Supporting Information
- Primary editor workflow: VS Code with YAML Language Server (Red Hat "YAML" extension). The extension provides validation, hover, and completion from JSON Schema (draft-07) and consumes schemas from the JSON Schema Store. When the editor or an installed extension surfaces front matter to the YAML Language Server,
$schemain the front matter will enable tooltips and validation based on this schema. GitHub Repo: redhat-developer/vscode-yaml - Front-matter routing caveat: Not all VS Code setups forward embedded Markdown front matter to the YAML Language Server automatically. Teams that require guaranteed editor validation can (a) use a sidecar front-matter file that the YAML extension recognizes as YAML, or (b) rely on CI validation (Ajv strict mode) in addition to in-editor hints. This maintains the SchemaStore entry's neutrality while documenting a reliable path for VS Code users. GitHub Issue: Support YAML front matter in Markdown files
- Rationale for draft-07: Broad editor compatibility today; aligns with the YAML Language Server's schema support and common tooling.
- Validation coverage: Positive and negative tests exercise required fields, UUIDv4 pattern, date/time formats, uniqueness and length constraints, and the
status->reviewedconditional.
Companion Tooling (optional; not part of the catalog entry)
We ship an optional Node script, stamp-frontmatter.mjs, used in VS Code tasks to streamline adoption:
- Create a new file with front matter -- generates a new
.mdor.qmdpre-populated with a minimal front-matter block, including a$schemapointer to the canonical URL and organization defaults (e.g.,params.type,params.project). - Ensure front matter exists -- for the current file, detects a leading YAML block delimited by
--- ... ---. If missing, inserts a block with the same minimal skeleton and$schema. If present, leaves it unchanged (or optionally, updates a few keys when flags are supplied).
This utility is outside the schema itself; it simply helps teams stamp files so the YAML Language Server (VS Code "YAML/Red Hat") can provide validation, hovers, and completions from this SchemaStore entry when $schema is present. Look for this optional tooling and an integration playbook on our organization's profile.
Example Usage
---
$schema: https://json.schemastore.org/tps-yaml-frontmatter.json
title: Example Document
subtitle: Short clarifier
author:
- name: Alex Doe
date: 2025-08-26
keywords: [documentation, governance]
abstract: This document standardizes front matter fields and workflows for consistent authoring, review, and publishing.
params:
id: 550e8400-e29b-41d4-a716-446655440000
type: doc
project: Documentation Toolchain
version: v1.0.0
status: draft
confidentiality: internal
title-meta: "{{< meta title >}}"
author-meta: "{{< meta author >}}"
date-meta: "{{< meta date >}}"
resources:
- "./"
- "/assets/**/*.png"
---
Rationale. stamping the
$schemakey directly into front matter makes the YAML Language Server pick up the SchemaStore entry automatically, yielding real-time validation and rich tooltips in editors. This keeps the SchemaStore submission itself editor-agnostic.
Are you making a PR for this?
Yes, I will create a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the SchemaStore entry for tps-yaml-frontmatter.json and review the draft-07 schema requirements in this issue. Validate required fields, UUIDv4, date/time formats, uniqueness and length constraints, and the status-to-reviewed conditional with positive and negative tests. Done means the canonical schema URL is supported and the stated validation coverage passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, vscode, yaml
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100