Skip to content

Conversation

farnabaz
Copy link
Member

@farnabaz farnabaz commented Jul 10, 2025

πŸ”— Linked issue

resolves #3314

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Thanks to nuxtlabs/nuxt-component-meta#84, content collections can now inherit their schema from a component's props.

  const buttons = defineCollection({
    type: 'data',
    source: 'buttons/**',
    schema: property(z.object({})).inherit('@nuxt/ui/components/Button.vue'),
  })

This is a long-planned feature designed to enhance and simplify content collections.

Copy link

vercel bot commented Jul 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
content-docs Ready Ready Preview Sep 10, 2025 10:05am

Copy link

cloudflare-workers-and-pages bot commented Jul 10, 2025

Deploying content with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: d91ba62
Status:Β βœ…Β  Deploy successful!
Preview URL: https://8813f74c.content-f0q.pages.dev
Branch Preview URL: https://feat-component-schema.content-f0q.pages.dev

View logs

Copy link

pkg-pr-new bot commented Jul 10, 2025

npm i https://pkg.pr.new/@nuxt/content@3451

commit: d91ba62

@farnabaz farnabaz marked this pull request as ready for review September 10, 2025 10:01
@farnabaz farnabaz merged commit a620a2c into main Sep 10, 2025
6 checks passed
@farnabaz farnabaz deleted the feat/component-schema branch September 10, 2025 10:07
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.

[DX] Automatically generate schemas from component props in content.config.ts
1 participant