Skip to content

chore: flatten metadata wrapper and extend frontmatter schema#715

Merged
alex72508 merged 2 commits intomainfrom
tamal/update/frontmatter-schema-metadata-fix
Apr 15, 2026
Merged

chore: flatten metadata wrapper and extend frontmatter schema#715
alex72508 merged 2 commits intomainfrom
tamal/update/frontmatter-schema-metadata-fix

Conversation

@tamalchowdhury
Copy link
Copy Markdown
Collaborator

@tamalchowdhury tamalchowdhury commented Apr 14, 2026

Several frontmatter fields (topics, sdk, languages, audience, complexity, keywords, updated) were incorrectly nested under a metadata: block in 99 pages across authenticate/ and billing/. The content schema has no metadata object, so all nested values were silently ignored by Astro's schema parser and never emitted as meta tags.

This PR flattens all those fields to top-level, adds topics and updated to the Zod schema in content.config.ts, and updates the contribution guide template and cursor rule to reflect the correct frontmatter shape going forward.

Summary by CodeRabbit

  • New Features

    • Extended documentation schema with new optional metadata fields for improved content organization.
  • Refactor

    • Restructured documentation frontmatter across 80+ pages to use a flattened schema with top-level fields.
    • Reformatted descriptive fields for consistent multiline YAML formatting.
    • Normalized array-based metadata into explicit YAML list structures.

- Promote nested metadata fields to top-level in 99 authenticate/billing pages
- Add topics and updated fields to content.config.ts Zod schema
- Update contribute guide frontmatter and template
- Remove featured/deprecated from template and cursor rule

Made-with: Cursor
@tamalchowdhury tamalchowdhury requested a review from a team as a code owner April 14, 2026 07:08
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

Walkthrough

A schema update adds topics and updated fields to the docs collection. Across 70+ documentation pages, nested metadata frontmatter objects were removed and their fields (topics, sdk, languages, audience, complexity, keywords, updated) were promoted to top-level keys. Multi-line text descriptions were reformatted from single-line strings to folded YAML blocks, and array values were normalized from inline bracket notation to explicit YAML lists.

Changes

Cohort / File(s) Summary
Schema Definition
src/content.config.ts
Added topics (optional array of strings) and updated (optional coerced date) fields to docs collection schema.
Authentication About Pages
src/content/docs/authenticate/about-auth/*
Removed nested metadata objects and promoted fields to top-level; reformatted description/ai_summary to folded multi-line YAML blocks; normalized array fields to explicit YAML lists.
Authentication Methods Pages
src/content/docs/authenticate/authentication-methods/*
Same structural refactoring: removed metadata wrapper, moved fields to top-level, reformatted descriptions as folded blocks, standardized array formatting.
Authentication Auth Guides & Enterprise Pages
src/content/docs/authenticate/auth-guides/*, src/content/docs/authenticate/enterprise-connections/*
Consistent frontmatter restructuring: promoted metadata fields to top-level, converted single-line descriptions to multi-line folded scalars, normalized array syntax; minor whitespace corrections in relatedArticles entries.
Authentication Custom Configs & Social Sign-In
src/content/docs/authenticate/custom-configurations/*, src/content/docs/authenticate/social-sign-in/*
Applied uniform frontmatter transformation: removed metadata nesting, elevated all fields to top-level keys, reformatted descriptions and arrays consistently.
Authentication Manage & Multi-Factor
src/content/docs/authenticate/manage-authentication/*, src/content/docs/authenticate/multi-factor-auth/*
Standard metadata flattening: eliminated metadata object, moved all nested fields to frontmatter root, converted descriptions to folded blocks, standardized list formatting.
Billing About & User Experience Pages
src/content/docs/billing/about-billing/*, src/content/docs/billing/billing-user-experience/*
Consistent refactoring across billing docs: removed metadata wrapper, promoted fields to top-level, reformatted description/ai_summary as multi-line blocks, normalized array syntax.
Billing Get Started, Manage Plans, & Related
src/content/docs/billing/get-started/*, src/content/docs/billing/manage-plans/*, src/content/docs/billing/manage-subscribers/*, src/content/docs/billing/payment-management/*, src/content/docs/billing/pricing/*
Applied uniform frontmatter restructuring: removed metadata objects, promoted fields to top-level, reformatted descriptions to folded blocks, standardized array formatting across all billing documentation pages.
Build Organizations & Contribute Index
src/content/docs/build/organizations/self-serve-portal-per-org.mdx, src/content/docs/contribute/index.mdx
Restructured frontmatter to remove metadata wrapper and elevate fields to top-level; updated updated date field; cleaned up template examples to remove empty values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop, hop! The metadata's moved to the top,
No nested objects cluttering the way,
Each field now gleams at frontmatter's display,
Descriptions unfold across lines so fine,
This refactoring's making the docs align!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: flatten metadata wrapper and extend frontmatter schema' accurately describes the primary change: removing nested metadata wrappers and adding schema fields.
Linked Issues check ✅ Passed The PR fully addresses all coding requirements from issue #685: extends src/content.config.ts schema with topics/updated fields, flattens metadata wrapper across 99 .mdx files, and updates contribution guide template.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #685 objectives: schema extension, metadata flattening, and template updates. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tamal/update/frontmatter-schema-metadata-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/content/docs/contribute/index.mdx (1)

196-197: Use list scaffolding for audience in the template example.

To better enforce the intended frontmatter shape, make audience visibly array-shaped in the snippet (same style as topics/keywords).

Proposed template tweak
-audience:
+audiance:
+  -
 complexity:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/contribute/index.mdx` around lines 196 - 197, The
frontmatter example currently shows "audience:" as a blank scalar; update the
template so "audience" is explicitly an array like the existing
"topics"/"keywords" scaffolding (e.g., present "audience:" with a list scaffold
or empty array placeholder) so consumers see the intended array shape; locate
the frontmatter example containing "audience:" and mirror the list style used
for "topics"/"keywords".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/content/docs/billing/about-billing/kinde-billing-faqs.mdx`:
- Around line 15-17: Replace the hyphenated frontmatter key "ai-summary" with
the underscored "ai_summary" so the field matches the content schema; locate the
frontmatter block where "ai-summary: >" is declared (the top metadata of this
MDX file) and rename the key to "ai_summary" preserving the multiline value and
indentation.

In `@src/content/docs/billing/manage-plans/create-plans.mdx`:
- Line 221: The image line currently has leading spaces causing it to be treated
as code; remove the indentation before the Markdown image line that contains
"![Price sync
status](https://imagedelivery.net/skPPZTHzSlcslvHjesZQcQ/bc88b122-c6d6-4352-1a54-2fe844f23c00/socialsharingimage)"
so it starts at column 0, and ensure there's a blank line above/below if needed
so the image renders as standard Markdown rather than inside a code block.

---

Nitpick comments:
In `@src/content/docs/contribute/index.mdx`:
- Around line 196-197: The frontmatter example currently shows "audience:" as a
blank scalar; update the template so "audience" is explicitly an array like the
existing "topics"/"keywords" scaffolding (e.g., present "audience:" with a list
scaffold or empty array placeholder) so consumers see the intended array shape;
locate the frontmatter example containing "audience:" and mirror the list style
used for "topics"/"keywords".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 77022421-a949-4b4a-93c6-08cbb54b877a

📥 Commits

Reviewing files that changed from the base of the PR and between c1de5be and 4a26d1f.

📒 Files selected for processing (101)
  • src/content.config.ts
  • src/content/docs/authenticate/about-auth/about-authentication.mdx
  • src/content/docs/authenticate/about-auth/authentication-faq.mdx
  • src/content/docs/authenticate/about-auth/authentication-methods.mdx
  • src/content/docs/authenticate/about-auth/identity-and-verification.mdx
  • src/content/docs/authenticate/about-auth/kinde-authentication-faq.mdx
  • src/content/docs/authenticate/about-auth/user-communication.mdx
  • src/content/docs/authenticate/auth-guides/enterprise-connections-identity.mdx
  • src/content/docs/authenticate/auth-guides/mixed-b2b-b2c.mdx
  • src/content/docs/authenticate/auth-guides/pass-params-idp.mdx
  • src/content/docs/authenticate/authentication-methods/email-authentication.mdx
  • src/content/docs/authenticate/authentication-methods/email-deliverability.mdx
  • src/content/docs/authenticate/authentication-methods/password-authentication.mdx
  • src/content/docs/authenticate/authentication-methods/passwordless-authentication.mdx
  • src/content/docs/authenticate/authentication-methods/phone-authentication.mdx
  • src/content/docs/authenticate/authentication-methods/set-up-user-authentication.mdx
  • src/content/docs/authenticate/authentication-methods/sms-deliverability.mdx
  • src/content/docs/authenticate/authentication-methods/username-authentication.mdx
  • src/content/docs/authenticate/authentication-methods/whatsapp-authentication.mdx
  • src/content/docs/authenticate/custom-configurations/advanced-organization.mdx
  • src/content/docs/authenticate/custom-configurations/authentication-experience.mdx
  • src/content/docs/authenticate/custom-configurations/custom-authentication-pages.mdx
  • src/content/docs/authenticate/custom-configurations/custom-oauth2-connection.mdx
  • src/content/docs/authenticate/custom-configurations/disable-sign-up.mdx
  • src/content/docs/authenticate/custom-configurations/prepopulate-identity-sign-in.mdx
  • src/content/docs/authenticate/custom-configurations/proxy-your-kinde-auth-pages-through-cloudflare.mdx
  • src/content/docs/authenticate/custom-configurations/redirect-users.mdx
  • src/content/docs/authenticate/custom-configurations/static-ip.mdx
  • src/content/docs/authenticate/enterprise-connections/about-enterprise-connections.mdx
  • src/content/docs/authenticate/enterprise-connections/advanced-saml-configurations.mdx
  • src/content/docs/authenticate/enterprise-connections/azure.mdx
  • src/content/docs/authenticate/enterprise-connections/cloudflare-saml.mdx
  • src/content/docs/authenticate/enterprise-connections/custom-saml-google-workspace.mdx
  • src/content/docs/authenticate/enterprise-connections/custom-saml.mdx
  • src/content/docs/authenticate/enterprise-connections/enterprise-connections-b2b.mdx
  • src/content/docs/authenticate/enterprise-connections/entra-id-saml.mdx
  • src/content/docs/authenticate/enterprise-connections/home-realm-discovery.mdx
  • src/content/docs/authenticate/enterprise-connections/idp-initiated-saml-sso.mdx
  • src/content/docs/authenticate/enterprise-connections/lastpass-sso.mdx
  • src/content/docs/authenticate/enterprise-connections/mapping-users-enterprise.mdx
  • src/content/docs/authenticate/enterprise-connections/okta-saml-connection.mdx
  • src/content/docs/authenticate/enterprise-connections/provision-users-enterprise.mdx
  • src/content/docs/authenticate/enterprise-connections/refresh-saml-certificate.mdx
  • src/content/docs/authenticate/manage-authentication/manage-authentication-applications.mdx
  • src/content/docs/authenticate/manage-authentication/navigate-between-organizations.mdx
  • src/content/docs/authenticate/manage-authentication/organization-auth-experience.mdx
  • src/content/docs/authenticate/manage-authentication/session-management-per-organization.mdx
  • src/content/docs/authenticate/manage-authentication/session-management.mdx
  • src/content/docs/authenticate/manage-authentication/sign-in-to-last-org.mdx
  • src/content/docs/authenticate/manage-authentication/sync-with-kinde.mdx
  • src/content/docs/authenticate/manage-authentication/user-auth-applications.mdx
  • src/content/docs/authenticate/multi-factor-auth/about-multi-factor-authentication.mdx
  • src/content/docs/authenticate/multi-factor-auth/enable-multi-factor-authentication.mdx
  • src/content/docs/authenticate/multi-factor-auth/mfa-per-org.mdx
  • src/content/docs/authenticate/social-sign-in/add-social-sign-in.mdx
  • src/content/docs/authenticate/social-sign-in/apple.mdx
  • src/content/docs/authenticate/social-sign-in/bitbucket-sso.mdx
  • src/content/docs/authenticate/social-sign-in/clever.mdx
  • src/content/docs/authenticate/social-sign-in/discord.mdx
  • src/content/docs/authenticate/social-sign-in/facebook.mdx
  • src/content/docs/authenticate/social-sign-in/github.mdx
  • src/content/docs/authenticate/social-sign-in/gitlab.mdx
  • src/content/docs/authenticate/social-sign-in/google.mdx
  • src/content/docs/authenticate/social-sign-in/linkedin.mdx
  • src/content/docs/authenticate/social-sign-in/microsoft-sso.mdx
  • src/content/docs/authenticate/social-sign-in/roblox-sso.mdx
  • src/content/docs/authenticate/social-sign-in/slack.mdx
  • src/content/docs/authenticate/social-sign-in/twitch.mdx
  • src/content/docs/authenticate/social-sign-in/twitter.mdx
  • src/content/docs/authenticate/social-sign-in/xero-sso.mdx
  • src/content/docs/billing/about-billing/about-billing.mdx
  • src/content/docs/billing/about-billing/billing-concepts-terms.mdx
  • src/content/docs/billing/about-billing/billing-faq.mdx
  • src/content/docs/billing/about-billing/kinde-billing-faqs.mdx
  • src/content/docs/billing/about-billing/kinde-billing-model.mdx
  • src/content/docs/billing/billing-user-experience/add-billing-to-url-sdk.mdx
  • src/content/docs/billing/billing-user-experience/customize-billing-pages.mdx
  • src/content/docs/billing/billing-user-experience/free-trials.mdx
  • src/content/docs/billing/billing-user-experience/plan-selection.mdx
  • src/content/docs/billing/billing-user-experience/pricing-table-display.mdx
  • src/content/docs/billing/get-started/add-billing-role.mdx
  • src/content/docs/billing/get-started/add-pricing-table.mdx
  • src/content/docs/billing/get-started/build-plans.mdx
  • src/content/docs/billing/get-started/connect-to-stripe.mdx
  • src/content/docs/billing/get-started/default-billing-currency.mdx
  • src/content/docs/billing/get-started/publish-plans.mdx
  • src/content/docs/billing/get-started/self-serve-portal-setup.mdx
  • src/content/docs/billing/get-started/setup-overview.mdx
  • src/content/docs/billing/manage-plans/about-plans.mdx
  • src/content/docs/billing/manage-plans/add-manage-plan-groups.mdx
  • src/content/docs/billing/manage-plans/cancel-plans.mdx
  • src/content/docs/billing/manage-plans/create-plans.mdx
  • src/content/docs/billing/manage-plans/upgrade-downgrade-plans.mdx
  • src/content/docs/billing/manage-subscribers/add-metered-usage.mdx
  • src/content/docs/billing/manage-subscribers/manage-customer-activity-webhooks.mdx
  • src/content/docs/billing/manage-subscribers/upgrade-downgrade-methods.mdx
  • src/content/docs/billing/payment-management/manage-stripe-connection.mdx
  • src/content/docs/billing/payment-management/payment-processor.mdx
  • src/content/docs/billing/pricing/pricing-models.mdx
  • src/content/docs/build/organizations/self-serve-portal-per-org.mdx
  • src/content/docs/contribute/index.mdx

Comment thread src/content/docs/billing/about-billing/kinde-billing-faqs.mdx Outdated
Comment thread src/content/docs/billing/manage-plans/create-plans.mdx
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying kinde-docs-preview with  Cloudflare Pages  Cloudflare Pages

Latest commit: dd12861
Status: ✅  Deploy successful!
Preview URL: https://84355248.kinde-docs-preview.pages.dev
Branch Preview URL: https://tamal-update-frontmatter-sch.kinde-docs-preview.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@alex72508 alex72508 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big one! Approved.

@alex72508 alex72508 merged commit 1fb3e68 into main Apr 15, 2026
6 checks passed
@alex72508 alex72508 deleted the tamal/update/frontmatter-schema-metadata-fix branch April 15, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Move nested metadata frontmatter fields to top-level across documentation pages

2 participants