Repository navigation
Replies: 15 comments 8 replies
|
Absolutely agree. As bloated as Wordpress and ACF are, the ability to repeat structures across the site based on CMS settings is a massive part of what we deliver to clients. Though technically it could all be hard-coded and ran through an AI Agent, a 'Page\Block builder' is something I keep running into as a need for a CMS, not just a want. If Emdash gains the functionality of ACF, I will be a happy developer. |
|
Totally agree, @lightyearsagency. Repeatable structured sections (hero, CTA, testimonials, etc.) are table stakes for agency delivery. The goal here is to give emdash that same composability without the ACF bloat. Glad to hear it resonates with your workflow. |
|
Hey! Would sections handle this? It seems like it could. |
|
Sections aren't as per-page dynamic, and insert into the main richtext area
currently i think. So there's no clean input for say... A tile builder with
title, icon, text and link each, than can be rearranged, and have a
variable number, inside their own wrapper.
I could be wrong, but wasn't able to work it out
…On Wed, 8 Apr 2026, 7:37 pm Matt Kane, ***@***.***> wrote:
Hey! Would sections <https://docs.emdashcms.com/guides/sections/> handle
this? It seems like it could.
—
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZDO2Y46NY2OC32ZWHR5D4UYMULAVCNFSM6AAAAACXOWSH4WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNBYG4YDONA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@ascorbic Good question. Sections are reusable Portable Text content that gets inserted into a richtext editor - they're great for pre-built content snippets. What this proposes is a field type where each page defines its own sequence of typed blocks (hero, CTA, feature grid, etc.), each with their own schema. The key difference is per-page composition with structured fields vs. inserting pre-authored content. @lightyearsagency described the use case well - a tile builder where each tile has title/icon/text/link, variable count, reorderable, in their own wrapper. Sections don't give you that per-field schema structure. That said, if you think Sections could be extended to cover this, happy to explore that direction instead. You know the architecture better than I do. |
|
Wordpress has Elementor and many page builders with WYSWYG support, even Gutenberg kinda does it. Without this approach, this project will be more developer focused then end user focused, and I doubt it gains as much traction as it needs to compete. |
|
Strong +1 on this! Reusable patterns would be a great addition to EmDash. I believe we can use the same JSON format EmDash already uses for Portable Text like @mvanhorn proposed. It looks like this would be similar to how Sanity CMS uses Portable Text for page building. I'm wondering if it would be possible to reuse |
|
@CacheMeOwside That's a good instinct and probably the cleanest path. The one thing PortableText assumes is that its input is a document with inline flow (paragraphs with marks, lists, inline custom blocks). A pure page-sections array skips the inline layer entirely. In practice that's fine - PortableText renders whatever types it finds in the components map - but it might be worth a small convention: either a wrapper block type for page-level sections, or just document that "pages are flat block arrays, rich-text pages embed richtext blocks inside." This also answers @ascorbic's earlier question: if Blocks use the same Portable Text format and |
|
I think @CacheMeOwside has the right instinct here. The scope can be quite a bit narrower. @mvanhorn is right though that the layout expected by PortableText is different. I wonder if a new sibling component would be a better approach than a helper though. It's worth looking at #679 too, which might help with the admin UI end of things. |
|
I started giving EmDash a try and to see how far I could get with it by applying it to a site that was already fully built out on Astro with a Directus backend/api. I wanted to see what EmDash was capable of by having 100% of the context I needed to understand what it could handle on a known project versus starting a site from scratch and running into issues as I went. So I converted all this site's current templates and data over to EmDash (in the past this would be crazy talk, but we now have AI and all that jazz). Anyway, not having this type of featues is one of the major pain points for me on this project so far, because I had built a "Page Builder" of "Blocks" and some repeating content/media as well. Directus handles "Page Builder" or "Repeater" type content using its Relationship and or JSON arrays of objects fields. Note: Directus just sits on top of a Database (Postgres, in my case) so it follows a database paradigm for all its fields. It talks a little bit about that here. It's my understanding that it uses Knex under the hood for DBs. It's Many to Any (M2A) Relationship field (aka interfaces) is what make the magic happen for Page Builders: It also has a repeater field that uses a JSON Array of Objects: Directus is great! And I'll continue to use it for larger API driven projects, but for smaller ones, I have been looking for something similar to EmDash, and since I already use Astro, I was excited to test it out. |
|
Production data point in support of the narrowed scope: we run an EmDash site in production whose landing pages are composed from exactly the shape this discussion proposes — five section block types (hero, feature grid, testimonials, cards grid, FAQ) registered as Portable Text custom blocks by a local plugin and rendered by mapping All of our friction is on the editing/schema side, which supports the "Blocks is mostly a schema-builder UI feature" framing. Concretely, the workarounds we ship because per-block sub-fields don't have parity with top-level field types:
Each is workaroundable, but each moves the editing experience further from what non-technical editors expect from a section builder. A blocks/sections field whose per-block sub-fields support objects, entry references, and media picking would let us delete all three workarounds — that field-type parity is, from where we sit, the entire gap. (Posted with AI assistance — Claude Code / Claude Fable 5, from @cyface's session; details are from our production plugin.) |
|
A concrete production data point, since this is still open. We run a small marketing site (Astro SSR + EmDash on Cloudflare D1/R2) whose pages are exactly the shape described here: hero, services, philosophy and process on First attempt: custom Portable Text block types. A local plugin registered eight
Where we ended up: one collection per page, flat prefixed fields (
A One detail from our renderers that might be worth folding into the sub-field design: derived values. Our services and process steps are numbered 01, 02, … and those numbers come from the array index in the Astro component, deliberately not from an editor field — an editor should not be able to renumber them into an inconsistent state. Any block or repeater design that assumes every rendered value has a corresponding input would push that back into the editor's hands. A way to mark a value as renderer-derived, or simply the guarantee that array order is stable and exposed, covers it. Relatedly, if a Written with AI assistance (Claude Opus 5). The technical claims come from our own migration off Portable Text blocks and back-to-back comparison of both approaches; responsibility for their accuracy is mine. |
|
I, and by I, I mean Claude, built a proof of concept Blocks / Page Builder, along with a demo template to see how it consumes its own blocks: You can clone the page-builder branch and Mostly, I wanted to see what the experience of a Blocks style Page Builder in Emdash would be like ,for myself and for clients, and this by adding the one main feature I felt was missing for me to use on many of my projects. On the other hand, I don't really know how to feel about it, considering I didn't touch a single line of code and didn't look over any code thereafter; I only directed Claude and steered him as I saw fit, so I make no claims to this being anything other than a proof; even though it seems to work pretty darn well. Anyway, here are some screenshots:
|
|
I have a proposal. Let me know what you think: |
|
We could certainly use the block editor itself, as is already the case, I believe, in the marketing template. There, it’s handled via a plugin, but what if it were built-in without a plugin and we used sections, for example, so that a section could be defined using content types? Of course, we’d need a repeater and a grid there so we could create page layouts and more structured content. The main thing is for the admin interface to serve the purpose it’s actually intended for, which is for a potential client or the web content administrator. Because someone who works with code doesn’t actually need the admin interface at all, they’ll just write the code themselves. So if we have a real-world scenario, such as a landing page for an event, the administrator must be able to use the editor to add a description of the event, speakers, a registration form, and so on. So you can’t have a hard-coded component with predefined fields, because, especially in the case of speakers, it’s possible that one might cancel at the last minute or that another one will need to be added, so there needs to be the option to add another subblock (item) for a speaker within a single block. |






Uh oh!
There was an error while loading. Please reload this page.
For building landing pages, marketing sites, and structured content beyond blog posts, EmDash needs a way to compose pages from reusable content blocks.
What this enables
A "Landing Page" content type with a "sections" field containing: Hero, Feature Grid, Testimonials, CTA, FAQ blocks. Each block type defines its own fields (e.g., Hero has heading, subheading, image, CTA button). Editors pick from available blocks, reorder them, and fill in per-block fields.
Proposed behavior
blocks[{_type: "hero", heading: "...", ...}, {_type: "cta", ...}]renderBlocks()helper maps block types to Astro componentsRelationship to Portable Text
EmDash already uses Portable Text for rich text (inline formatting, links). Blocks are complementary -- they're for page-level structure, not inline content. A blocks field could contain Portable Text fields within individual blocks.
Scope
Two phases:
The existing
packages/blocks/directory has Portable Text block definitions and a playground that could serve as a foundation.Happy to start with Phase 1 if the direction makes sense. Would appreciate guidance on whether to build on top of the existing blocks package or keep this separate.
All reactions