Skip to content

feat(content-docs): support last_update front matter override#12049

Open
Rajith-14 wants to merge 2 commits into
facebook:mainfrom
Rajith-14:feat/last-update-frontmatter
Open

feat(content-docs): support last_update front matter override#12049
Rajith-14 wants to merge 2 commits into
facebook:mainfrom
Rajith-14:feat/last-update-frontmatter

Conversation

@Rajith-14
Copy link
Copy Markdown

@Rajith-14 Rajith-14 commented May 21, 2026

Summary

Implements last_update front matter support for docs pages (issue #5691).

Allows authors to manually set last_update.author and last_update.date
in front matter, overriding git-derived values. Front matter takes priority
over git — if only one field is provided, the other falls back to git.

Changes

  • frontMatter.ts: Extended schema via FrontMatterLastUpdateSchema.concat()
  • docs.ts: Front matter override logic — front matter wins, git is fallback
  • docs.test.ts: Fixed timestamp assertions to use seconds

Test Plan

  • Test Files 182 passed (182)
    Tests 2886 passed (2886)
  • TypeScript check clean
  • Manually tested with yarn workspace website start
  • Screenshot:
Screenshot 2026-05-21 163800

Related Issue

Closes #5691

@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label May 21, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 21, 2026

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 2c53808
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6a0ef8e8223eaf0008f2eaf7
😎 Deploy Preview https://deploy-preview-12049--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