@moorage/plugin-seo
v0.3.2
Published
SEO for EmDash: schema markup, JSON-LD structured data, Google preview, SEO checks, noindex, WordPress redirects import. Yoast alternative.
Maintainers
Readme
SEO & Schema Markup for EmDash
SEO & Schema Markup for EmDash: one linked structured data graph, noindex and snippet rules, a Google preview, on-page SEO checks and redirects import from WordPress. Runs on any EmDash site, with no account and no key.
What it does today
- Replaces EmDash's single JSON-LD object with one linked graph per page: Organization (or Person, or a LocalBusiness type), WebSite, WebPage, BreadcrumbList, the primary image (with its width and height when it is one of the entry's own images), and BlogPosting with its authors (the bylines without a role label such as "Photos by") and dates on article pages.
- Writes the robots tag:
noindexper collection, andmax-snippet,max-image-previewandmax-video-previewlimits on indexable pages. A noindex set in an entry's SEO panel is always kept. - Uses the theme's breadcrumb trail when it passes one, otherwise derives Home and one crumb per URL segment.
- Adds your own schema from an entry to the same graph: add a JSON field named
json_ldto a collection and paste any schema.org object (for example an Event or a Product). Give it an@idand the page names it as its main entity. An object whose@idis already used in the graph is left out. - On a page kept out of search (noindex), describes the site only: no WebPage, image or breadcrumb markup.
It does not write the page title, the sitemap or robots.txt; EmDash core and your theme do.
Install
From Registry in your EmDash admin (it is listed in the EmDash registry), or from npm, registered in your site's code:
pnpm add @moorage/plugin-seo// astro.config.mjs (on Cloudflare)
import { sandbox } from "@emdash-cms/cloudflare";
import seo from "@moorage/plugin-seo";
import emdash from "emdash/astro";
export default defineConfig({
integrations: [emdash({ sandboxed: [seo], sandboxRunner: sandbox() })],
});// wrangler.jsonc: the Worker Loader binding sandbox() runs plugins in (Workers Paid only)
"worker_loaders": [{ "binding": "LOADER" }]sandboxed needs a sandbox runner: on Cloudflare it takes both lines above, sandboxRunner: sandbox() and the LOADER Worker Loader binding (answering Yes to sandboxed plugins in create-emdash adds only the binding); on Node add @emdash-cms/sandbox-workerd and set sandboxRunner: "@emdash-cms/sandbox-workerd/sandbox". Without a runner, list the plugin under plugins: [seo] instead, which runs it in-process. Requires EmDash 1.5.0 or newer. Since 0.1.8 your settings survive moving the plugin from one list to the other; when updating from an earlier version, update first, open the SEO page once, then move it.
On Cloudflare's Workers free plan each request gets about 10 ms of CPU. EmDash's own saving and publishing already comes close to that, and every plugin run in the site's process adds a little, so a save or publish can now and then fail with "Worker exceeded resource limits"; trying again works. Workers Paid (30 seconds per request) does not have this problem.
It asks for four permissions: read content, read bylines, read the content schema, and manage redirects. The registry lists a fifth, read redirects, which managing them includes. It makes no requests to any outside service.
The SEO page
One page, SEO, in the admin sidebar, with three tabs. It works before you touch it: the site is described as an organisation named after the site, each content type is guessed from its name (posts and blog become blog posts, services become services, team becomes people), and your pages are checked by themselves.
- Overview: how many pages were checked, how many have nothing to fix and how many do (the last two add up to the first; pages hidden from search are listed below them, not counted); a warning whenever a content type is hidden from Google; one question if you have not said who the site is for; then Your details, the few things Google still needs for your kind of site (an address, opening hours and a phone number for a local business; a logo and profiles for a company); then the pages to fix, each with what is missing and a link to the page; and, folded, pages that are fine but could be better.
- Redirects: your redirects, with Change and Remove on each, and three buttons above the list. Add a redirect: the old address, where to send visitors, and the kind (permanent unless you choose otherwise). Import from WordPress: paste a CSV export from Redirection, Yoast SEO Premium or Rank Math (CSV only: Rank Math's CSV export is in its paid version, and Redirection's JSON, .htaccess and Nginx exports are not read); it is checked before anything is added and can be removed again as a batch. Export: a copyable list. EmDash already redirects a page's old address when you change it.
- Settings: who the site is for (a local business, a company or a person) and what you do, then folded sections ordered by how much they matter for that kind of site. Each title says whether the section is needed, worth adding or optional, and what is already filled in: address and phone, opening hours (two ranges a day for split shifts), logo, profiles elsewhere, more about you, and content types (what each kind of content is, and whether it is hidden from Google, which asks before it saves). One location for now. A local business is described as an organisation until it has an address, because Google requires one. At the end, folded, Copy settings to another site: the settings as text to copy, and a box to paste another site's. Pasted settings are checked first, with a table of what would change, and saved only when you press Apply these settings. They hold who the site is for, its details, opening hours, profiles and content types; no passwords or keys (the plugin keeps none). Hiding a content type from Google still asks this site's admin to confirm it on the Overview. Redirects are copied separately, with Export and Import from WordPress on the Redirects tab (the import reads the export).
| Copy settings to another site | What will change, before Apply | The Google preview panel, with Check all markup |
| ----------------------------------- | ----------------------------------------- | ----------------------------------------------- |
|
|
|
|
Admins can change settings. Editors see a read-only page with the pages to fix.
In the entry editor, the Google preview panel shows how the published page may look on Google (address, title, description; without a Meta Description it shows the excerpt and says so, since your theme may use another field, such as a standfirst, which a plugin cannot see), what kind of page it is, whether it is in search results, and up to three things to fix. Admins can also change one page's type, open Google's Rich Results Test for the page or the schema.org Validator (Check all markup, which also reads the Organization and LocalBusiness details Google's test skips), and view the markup. A dashboard widget shows the number of pages to fix.
The checks
To fix: no title; a title that says nothing, such as "Home"; no search description (an entry's excerpt counts as one, as it does in EmDash; a description EmDash's WordPress import left in the entry's SEO Description field is named as such, since the page does not use it); the same title as another page; a canonical address that points at a different page. Worth a look: a search title from WordPress, or a description when the excerpt stands in, that the page does not use yet; a title that may be cut off (measured with your site's name after it, as most sites show it); no picture for shared links (dropped once the page has been shown with a picture your theme adds); an article with no author (credits with a role, such as "Photos by", are not authors); pictures without alt text; a page with almost no text. Hidden pages are listed separately and kept out of the counts, and content without a page of its own (testimonials, for example) is left out. There is no score, and no keyword, readability or word-count rule: Google documents none of them as ranking factors.
Not yet: Product and Event types (they need price and date fields on the collection), and FAQ (Google stopped showing FAQ results in May 2026). Use the json_ld field for those today.
Use with an AI assistant (MCP)
EmDash serves an MCP endpoint at /_emdash/api/mcp that AI assistants such as Claude or ChatGPT can connect to. This plugin adds one tool to it. The tool only reads and never changes a page, so your assistant can ask what needs fixing and then make the changes through EmDash's own content tools.
seo__to_fixreturns the pages to fix, as the Overview lists them, with the pages that have the most problems first. For each page you get the content type, id, title, web address, and each problem as a code (such asno-description) and the Overview's sentence. It also returns the Overview's counts: pages checked, pages with nothing to fix, pages to fix, and pages hidden from search. Pages hidden from search are not listed. Input:limit(1 to 100, default 25) and, optionally,collection(a content type's slug, such asposts). Until every page has been checked once, it says so and lists nothing. It is for Editors and Admins, as the SEO page is.
The tool is off until an Admin switches it on: in the admin, open Plugins, open SEO & Schema Markup and switch on Agent access, which lists the tool. The assistant's token needs the scope mcp:tools:seo (this plugin's tools only) or mcp:tools (every plugin's tools), and the person it acts for must be an Editor or Admin. When an update adds or changes tools, EmDash asks an Admin to approve them again.
To fix a page, the assistant uses EmDash's own tools, then calls seo__to_fix again: a page is checked again when it is saved. On a live page, ask it to suggest new SEO titles and descriptions rather than save them: EmDash puts a change to a live page's SEO panel live at once, even when the rest of the change is saved as a draft, so no approval can hold it.
FAQ
- I moved from WordPress with the EmDash Exporter. Where are my Yoast titles and descriptions? In each entry's SEO Title and SEO Description fields, which the page does not use; the pages to fix list them. Copy each into the entry's SEO panel (SEO Title and Meta Description), leaving the " | Site name" ending off the title, because your site adds its own name and would otherwise show it twice.
- Is it free? Yes, on any number of sites, your own or your clients', with no account and no key. It is open source under the MIT License: you may use, change, copy and share the code, in paid work too, as long as the copyright notice stays with it.
- How do I add schema markup to EmDash? Install this plugin; it adds structured data (JSON-LD) to every page.
- How do I add my own structured data to one page? Add a JSON field named
json_ldto the collection and paste the schema.org object into the entry. It joins the page's one graph; the page still has a single JSON-LD script. - Is there a Yoast alternative for EmDash? EmDash core covers titles, descriptions, sitemaps and canonicals; this plugin adds the schema graph, robots rules, previews and checks.
- Does it check my page while I type? No. EmDash does not let a general-purpose plugin read unsaved text. The panel and the checks describe the published page, as Google sees it: changes to the page show up once you publish, and changes in the SEO panel show up as soon as they are saved.
- Can I use it next to another schema plugin? Use one schema plugin at a time. Both send the page's main JSON-LD script, and EmDash keeps only the first one it receives, so the other plugin's markup, or this one's, silently goes missing. Remove the other one, or this one.
- Does it tell Bing about new pages (IndexNow)? Not yet. Search the EmDash registry for "IndexNow": plugins there notify Bing and the other IndexNow engines when a page is published. Google does not use IndexNow.
- How do I set up several sites the same way? On the first site, open SEO > Settings > Copy settings to another site and copy the text. On the next site, paste it in the same place, press Check, read what will change, and press Apply these settings. Content types the other site does not have are left out.
- Is there an SEO score or a traffic light? No, on purpose. You get a list of things to fix that can reach zero.
- Does it add FAQ rich results? No. Google stopped showing FAQ rich results in May 2026.
- How do I import redirects from WordPress? Export them as CSV from Redirection, Yoast SEO Premium or Rank Math (Rank Math's CSV export is in its paid version; Redirection's JSON, .htaccess and Nginx exports are not read), open SEO > Redirects > Import from WordPress, paste the list and press Check list. Nothing is added until you confirm.
- Why were some redirects skipped? EmDash has no regular-expression redirects. Exact addresses and "everything under a folder" are converted; other patterns are listed for you to rewrite by hand. Redirects to another website and addresses with a
?are not supported by EmDash. A new address written in full on this site's own domain (with or withoutwww.,httporhttps) is imported as a path. New addresses are written the way your site writes its own: with a closing slash if your site's addresses end in one, without one otherwise. Nor are old addresses that end in a file type, such as/sitemap_index.xmlor/wp-content/uploads/photo.jpg: EmDash treats them as file requests and never redirects them. - Why does a large import take a while on Cloudflare? Sandboxed plugins may only do a few operations per request, so a long list is added a few rows at a time in the background, and removing an import works the same way. The page shows how far it got. You can leave the page.
- What is the line at the foot of the page? Only admins see it: "Help · More free plugins · by Moorage", links to the guide on moorage.dev and to more free plugins. Editors never see it. To hide it, switch on "Hide the help line at the foot of this page" at the bottom of the Settings tab and press Save.
- Why do the Google preview and the checks show the site's old address? Plugins keep the site address EmDash had when the server started; SEO uses it for the preview, for checking canonicals and logo links, and for the structured data when a page has no address of its own. After changing the site's address, restart the site.
Changelog
See CHANGELOG.md; unreleased changes are in the repository's .changeset folder.
Develop
pnpm --filter @moorage/plugin-seo build # emdash-plugin build
pnpm --filter @moorage/plugin-seo test # validate + vitest through the sandbox harness
pnpm --filter @moorage/plugin-seo validateLicence
MIT. Releases 0.1.0 to 0.1.2 were published under FSL-1.1-MIT; GoSi Tech, which holds the copyright, now also licenses them under MIT. Moorage is a product of GoSi Tech.
