Plugins should be able to declare collections and taxonomies in their descriptor #161
treeslikemedia
started this conversation in
Ideas
Replies: 3 comments 1 reply
|
This is a good idea, and I did identify this as a missing part. I would also like the abiity for plugins to add system fields to content types too |
1 reply
|
I think this is a missing feature for developing some plugins like post-views or post-likes. Hope to see this soon. |
0 replies
|
I'm building a giveaway plugin and hit the exact same issue. My plugin needs /picker, /dashboard, /result/[id] pages that can't live in the plugin today. Would gladly help test a PR for this if someone picks it up. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
When building a sandboxed plugin that needs its own structured content (e.g. "Listings", "Events", "Recipes" — any domain-specific post type), there's currently no way for the plugin to declare these as proper EmDash collections in its descriptor.
PluginDescriptor.storageonly creates plugin-scoped storage (ctx.storage). These don't appear in the admin content editor, don't support drafts/revisions/SEO, and don't get the built-in list/edit UI that proper collections receive.The only way to create collections and taxonomies today is via the site's
.emdash/seed.json, which means:Proposal
Add optional
collectionsandtaxonomiesfields toPluginDescriptor(orPluginDefinition), using the same shape asSeedCollectionandSeedTaxonomy:During
plugin:install, EmDash would apply these like a seed — creating the collections/taxonomies if they don't already exist (usingonConflict: "skip"semantics so they don't clobber user customizations).The plugin would then access its content via the existing
ctx.contentAPI (withread:content/write:contentcapabilities), which already works.Example
Why this matters
Without this, any plugin that needs structured content has to either:
Neither of these is the WordPress-like "install and go" experience that makes plugin ecosystems thrive.
All reactions