Expand the EmDash CMS guide from stub to full guide - #14428
Conversation
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
3d8e7fe to
6c3a98a
Compare
|
Preview deployment ✅ Deployment complete!
|
ArmandPhilippot
left a comment
There was a problem hiding this comment.
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.
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.
|
Thanks for the review. I applied all of it, including the new "Integrating with Astro" section and the setup-wizard reorder with On
On React: the manual install is gone. The guide now uses |
ArmandPhilippot
left a comment
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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:
| 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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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:
| You will also need the EmDash package: | |
| You also need to install the EmDash package: |
|
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
left a comment
There was a problem hiding this comment.
Thanks again for the updates, and this new guide! 🙌🏽
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()andgetEmDashEntry(), and deploying; the stub's official resources stay. React is added withastro 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 theerrorbranch, sincegetEmDashEntry()setserrorfor an unknown slug too, which turns the docs' error-then-404 pattern into a 500 on every unknown URL.References