feat(admin): allow hiding built-in core features from admin sidebar #866
Replies: 2 comments 1 reply
|
I've moved this to a discussion, as it's a feature request. This is a good idea. The pages and posts part you can do today though: they're just content types, which you can remove if you want. |
|
One concrete case for this, measured on 0.37.0, and a smaller default that would cover it without any new option. Our three sites set The same file already does the conditional thing for two other items: Registry and Marketplace only appear when the manifest says they are available. Comments could follow that rule with zero config: show the item only when at least one collection has Related on the plugin side: plugin admin pages have no |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Allow Astro projects to opt out of built-in core features (Pages, Posts, Comments, Menus, Redirects, Widgets, Sections, Categories, Tags, Bylines) so they don't appear in the admin sidebar.
Motivation
Many sites use only a subset of EmDash's content surface. For example, a content site with custom collections (authors, blog, events, gallery, locations) may never use Pages, Posts, Comments, Menus, Redirects, Widgets, Sections, Categories, Tags, or Bylines.
Today every install ships with all of these visible in the sidebar, even when empty. For non-technical editors this adds noise — they see eleven nav entries when only five are relevant — and increases the surface area for "what is this for?" support questions.
The current
emdash()integration exposesdatabase,storage,plugins,fonts,auth,authProviders,siteUrl,trustedProxyHeaders,maxUploadSize, but no admin/feature-visibility knob. Thepluginsarray adds plugins; there's no symmetric way to omit core features.Proposed API
A
disabledFeatures(orfeatures: { posts: false, ... }) option on the integration:Disabling a feature should:
Alternatives Considered
Context
Real-world install: an Astro site migrated from a git-based CMS to EmDash for the database-first publishing model, using only a small set of custom collections. The unused core features are inert but visible.
All reactions