Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(zod): editor metadata #3133

Merged
merged 7 commits into from
Feb 18, 2025
Merged

feat(zod): editor metadata #3133

merged 7 commits into from
Feb 18, 2025

Conversation

larbish
Copy link
Collaborator

@larbish larbish commented Feb 14, 2025

🔗 Linked issue

https://github.com/nuxtlabs/studio-app/issues/2074

❓ 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

Being able to define editor types in collection definition: image1: z.string().editor({ type: 'media' })

The idea is to generate JsonSchema with the corresponding metadata and being able to adapt frontmatter edition when preview mode is activated.

Extra input types:

  • icon
  • media

Other options:

  • hide (do not display this field)

An improvement has been also added on Studio side to handle enum values as select.

Check Studio behaviour for the docs/content.config.ts updated below:

editorzod.mp4

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Sorry, something went wrong.

Copy link

pkg-pr-new bot commented Feb 14, 2025

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

commit: 64125cf

up
Copy link

cloudflare-workers-and-pages bot commented Feb 17, 2025

Deploying content with  Cloudflare Pages  Cloudflare Pages

Latest commit: 64125cf
Status:🚫  Build failed.

View logs

up

Unverified

This user has not yet uploaded their public signing key.
@larbish larbish changed the title [WIP] feat(zod): editor metadata feat(zod): editor metadata Feb 17, 2025
up

Unverified

This user has not yet uploaded their public signing key.
up
This reverts commit 0eea853.
up
@farnabaz farnabaz merged commit 7a9ca9e into main Feb 18, 2025
4 of 5 checks passed
@farnabaz farnabaz deleted the feat/zod-editor branch February 18, 2025 12:36
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.

None yet

2 participants