Skip to content

Feat/create metadata impl#12166

Open
HelloItsJustin wants to merge 2 commits into
facebook:mainfrom
HelloItsJustin:feat/create-metadata-impl
Open

Feat/create metadata impl#12166
HelloItsJustin wants to merge 2 commits into
facebook:mainfrom
HelloItsJustin:feat/create-metadata-impl

Conversation

@HelloItsJustin

Copy link
Copy Markdown

Pre-flight checklist

Closes #5691.

This PR adds creation metadata support for docs, mirroring the existing last_update metadata flow. Docs can now expose when a page was originally created and who created it, using front matter values first and VCS metadata as a fallback.

The new behavior is opt-in and disabled by default, so existing sites keep the same behavior unless they enable the new plugin options.

This PR adds:

  • showCreateTime and showCreateAuthor docs plugin options, both defaulting to false
  • New front matter fields: last_update_time, last_update_author, create_time, and create_author
  • Front matter validation for the new fields
  • Creation metadata resolution from front matter first, then VCS history
  • createdAt and createdBy fields in docs metadata
  • Classic theme footer rendering for creation metadata
  • Theme translation message IDs for the new footer text
  • Documentation for the new options and front matter fields

Test Plan

Validated locally with:

pnpm test packages/docusaurus-plugin-content-docs
pnpm test packages/docusaurus-theme-classic
pnpm test packages/docusaurus-utils/src/__tests__/lastUpdateUtils.test.ts
pnpm build

Results:

  • Docs plugin tests passed: 380 tests
  • Classic theme tests passed: 65 tests
  • Focused utility metadata tests passed: 21 tests
  • Full package and website build passed

Local validation notes:

  • pnpm lint currently fails because the existing root script calls lint:SPELLING, while the script is named lint:spelling.
  • pnpm lint:ci passes eslint, stylelint, and cspell, then fails on existing syncpack lint dependency policy issues unrelated to this PR.
  • Full pnpm test fails locally in unchanged Windows-sensitive VCS/submodule tests, not in the docs metadata tests changed by this PR

Relevant documentation page:

  • /docs/api/plugins/plugin-content-docs

Related issues/PRs

Closes #5691.

@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Jun 13, 2026
@netlify

netlify Bot commented Jun 13, 2026

Copy link
Copy Markdown

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 441e563
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6a2d726c973cba000818639c
😎 Deploy Preview https://deploy-preview-12166--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Last updated: feeding data through front matter, new "created" metadata

1 participant