Skip to content

[finding] content/blog frontmatter has the same unowned parse invariant as content/docs — the second defineDocs root nothing local reads #10754

Description

@claude

Sibling gap left open by the content/docs frontmatter gate added in PR #10752 (issue #10493),
recorded rather than folded in: that card's subject is content/docs, and a second root would
give one gate two populations and two refusal semantics.

The gap

apps/docs/source.config.ts makes twodefineDocs calls:

exportconstdocs=defineDocs({dir: path.resolve(process.cwd(),'../../content/docs'), ... });exportconstblog=defineDocs({dir: path.resolve(process.cwd(),'../../content/blog'), ... });

so next build parses content/blog/** frontmatter exactly the way it parses content/docs/**
-- same fumadocs-core/content/md/frontmatter extractor, same yaml@2.9.0, and a blogSchema
that is pageSchema.extend({ author, date, tags }), so it inherits the required
title: z.string() and the optional-but-typed description: z.string().optional().

Nothing local reads it. Measured at 8f04d9a4ff:

  • scripts/check-doc-frontmatter.mjs (new) walks content/docs only;
  • scripts/docs-audit/affected-docs.mjs walks content/docs only;
  • scripts/check-doc-anchors.mjs blanks frontmatter by design;
  • scripts/check-doc-authoring.mjs takes content as a root, so it does read these three
    files -- but it scans fenced TypeScript blocks for the bare-metadata-literal anti-pattern and
    has no notion of frontmatter.

So an unquoted description containing a colon in a blog post is the same defect as issue
#10493, reaching the same 30-minute next build before anything says so.

Measured state

3 .mdx under content/blog/. All three parse clean today, all three carry a string title
and a string description -- no backlog, nothing to grandfather. Small population, so the cost
is a root, not a baseline.

Suggested shape (not prescriptive)

Either widen scripts/check-doc-frontmatter.mjs to take a list of roots -- each with its own
non-empty assertion, so a root that resolves to zero pages still refuses per-root rather than
being covered by the other root's count -- or give the blog its own step. The refusal semantics
are the part worth being careful about: the existing gate's whole point is that a walk over
nothing is exit 1, and a naive two-root union would let an empty content/blog hide behind 403
docs pages.

Not touching content/blog itself -- there is nothing wrong with the three pages.

Filed unassigned, for triage.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions