An SEO plugin for EmDash CMS that generates meta tags, Open Graph, Twitter Cards, canonical URLs, robots directives, and JSON-LD schema markup via the page:metadata hook.
- Meta descriptions with configurable fallback chain
- Meta robots with
max-snippet,max-image-preview, andmax-video-previewdirectives;noindexfor search/utility pages; omitted on 404 - Canonical URLs — absolute, normalized, with trailing slash and pagination support
- Open Graph —
og:titlewithout site name suffix,og:type: articlefor content pages, full set of OG tags - Twitter Cards —
summary_large_imagewhen image present, site handle from settings - JSON-LD schema graph with linked nodes:
PersonorOrganization(configurable)WebSitewithSearchActionWebPage(CollectionPagefor archives)Articlewith authorPerson(for content pages)
- Admin settings UI — auto-generated from
settingsSchemafor configuring Person/Organization identity, social profiles, title separator, and default description
Copy the src/ directory into your EmDash theme's plugins/seo/ directory, or install from this repo:
# In your emdash theme directory
cp -r path/to/emdash-plugin-seo/src plugins/seo/src
cp path/to/emdash-plugin-seo/package.json plugins/seo/package.jsonRegister the plugin in your astro.config.mjs:
import { seoPlugin } from "./plugins/seo/src/index.ts";
export default defineConfig({
integrations: [
emdash({
plugins: [seoPlugin()],
}),
],
});Then configure your site identity and social profiles in the EmDash admin under Plugins > SEO > Settings.
| Setting | Description |
|---|---|
| Site represents | Person or Organization |
| Title separator | Character between page title and site name (em dash, pipe, hyphen, dot) |
| Default meta description | Fallback for pages without their own |
| Person name / bio / image / job title / URL | Person schema fields |
| Organization name / logo URL | Organization schema fields |
| Social URLs | Twitter/X, Facebook, LinkedIn, Instagram, YouTube, GitHub, Bluesky, Mastodon, Wikipedia |
Requires EmDash with support for running page:metadata hooks on public pages for anonymous visitors. See emdash-cms/emdash#166 and PR #169.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
If you find a security vulnerability, please follow the security policy instead of opening a public issue.
MIT — see LICENSE for details.