Skip to content

Expand the EmDash CMS guide from stub to full guide - #14428

Merged
ArmandPhilippot merged 7 commits into
withastro:mainfrom
danielmlr:add/emdash-cms-guide
Sep 9, 2026
Merged

Expand the EmDash CMS guide from stub to full guide#14428
ArmandPhilippot merged 7 commits into
withastro:mainfrom
danielmlr:add/emdash-cms-guide

Conversation

@danielmlr

@danielmlr danielmlr commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description (required)

This replaces the EmDash stub with a full CMS guide, structured like the Keystatic guide, the other CMS that runs inside the Astro project.

It opens with how EmDash integrates with Astro, then covers installing the packages, the integration, the live collections loader, the setup wizard, creating a post, rendering content with getEmDashCollection() and getEmDashEntry(), and deploying; the stub's official resources stay. React is added with astro add react, as in the Keystatic guide, which brings the JSX compiler options and type packages.

Every step and code block was run against fresh Astro projects (Astro 7.2.10, emdash 0.36.0, Node 26). Two choices come from that rather than the EmDash docs: output: "server" is a prerequisite because a static build fails while prerendering an EmDash API route, and the single-entry example omits the error branch, since getEmDashEntry() sets error for an unknown slug too, which turns the docs' error-then-404 pattern into a 500 on every unknown URL.

References

@astrobot-houston

astrobot-houston commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/cms/emdash.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@danielmlr
danielmlr force-pushed the add/emdash-cms-guide branch from 3d8e7fe to 6c3a98a Compare August 19, 2026 13:47
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Preview deployment

✅ Deployment complete!

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the guide, and your patience!

I left a few suggestions around content organization and components use based on our contributing guide. Feel free to check the accuracy and reword if needed where I suggested some content changes.

Comment thread src/content/docs/en/guides/cms/emdash.mdx
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
Comment thread src/content/docs/en/guides/cms/emdash.mdx Outdated
@ArmandPhilippot ArmandPhilippot added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. 3rd-party guide Community submitted CMS, deploy, backend etc. guide labels Sep 7, 2026
Adds an "Integrating with Astro" section that carries the integration model
and the database choice, makes output: "server" explicit in the
prerequisites, uses PackageManagerTabs for the dev server command, turns
both ReadMore wrappers into plain links because they point at external
docs, folds the setup-wizard aside into the section introduction with the
dev server as the first step, and drops the react() registration note:
EmDash warns at astro:config:done when the integration is missing, so the
sentence repeated what the tool already says.
The Keystatic guide, the other CMS whose admin UI is React, adds the
integration with `astro add react` and installs the CMS packages separately.
`astro add` writes the JSX compiler options and the React type packages that a
manual install leaves out, so the guide follows the same shape: `astro add
react`, then `npm install emdash`.

Because `astro add` already registers `react()`, the config example now marks
only the EmDash import and integration lines as added.
@danielmlr

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I applied all of it, including the new "Integrating with Astro" section and the setup-wizard reorder with npm run dev as the first step. Your Cloudflare link had a doubled opening paren, which I fixed on the way in.

On output: "server": you are right, and it is a requirement, not a convention. With output: "static" and the Node adapter, astro build fails while prerendering, on an EmDash API route rather than on anything the reader wrote:

prerendering static routes
[GetStaticPathsRequired] `getStaticPaths()` function is required for dynamic routes. Make sure that you `export` a `getStaticPaths()` function from your dynamic route.
  Location:
    …/emdash/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs:0:0

export const prerender = false on the reader's own pages does not change that. Measured on EmDash 0.36.0 with Astro 7.2.10.

On React: the manual install is gone. The guide now uses astro add react and installs emdash separately, the way the Keystatic guide handles the same case, so the JSX compiler options and the React type packages come along and there is no TypeScript step to skip.

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! This looks almost good to me.
I've left two suggestions for the "Installing dependencies" section. I can see this is the same format used in the Keystatic guide but this is an old guide, and I think this can be improved to match our current writing style.


## Installing dependencies

Add the React integration (for the EmDash admin UI) to your Astro project, using the `astro add` command for your package manager. It is required even if your site does not otherwise use React:

@ArmandPhilippot ArmandPhilippot Sep 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the guide is about adding EmDash to an existing project, installing React might not be necessary for everyone. So, I think this should be phrased differently:

Suggested change
Add the React integration (for the EmDash admin UI) to your Astro project, using the `astro add` command for your package manager. It is required even if your site does not otherwise use React:
React powers the EmDash admin interface and is a required dependency. If your project does not use React, install it using the `astro add` command for your package manager:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied. Your version is more accurate too: a project that already has the React integration has nothing to do at this step.

</Fragment>
</PackageManagerTabs>

You will also need the EmDash package:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I can see the Keystatic guide use the future tense, but this is an old guide that may not be fully updated to conform to our current standards. We usually address to the reader using the present tense:

Suggested change
You will also need the EmDash package:
You also need to install the EmDash package:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied.

@danielmlr

Copy link
Copy Markdown
Contributor Author

Both applied in a997a32. I also changed one more future-tense line for the same reason, in "Running EmDash locally": "You will be redirected to the setup wizard" is now "EmDash redirects you to the setup wizard". Revert that one if you'd rather keep the diff to what you flagged.

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the updates, and this new guide! 🙌🏽

@ArmandPhilippot
ArmandPhilippot merged commit b5fe354 into withastro:main Sep 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3rd-party guide Community submitted CMS, deploy, backend etc. guide add new content Document something that is not in docs. May require testing, confirmation, or affect other pages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants