@karaoke-cms/module-seo
v0.18.1
Published
SEO module for karaoke-cms — OG images, JSON-LD, robots.txt
Maintainers
Readme
@karaoke-cms/module-seo
Zero-config SEO for karaoke-cms — OG social card images, JSON-LD structured data, canonical tags, Twitter meta, and a robots.txt. Add it once; every published page gets the full treatment automatically.
Installation
npm install @karaoke-cms/module-seoUsage
// karaoke.config.ts
import { defineConfig } from '@karaoke-cms/astro';
import { seo } from '@karaoke-cms/module-seo';
export default defineConfig({
// ...
modules: [seo()],
});No options required. The module reads your existing title, description, date, and author frontmatter fields automatically.
What it adds
OG social card images
At build time, the module scans your dist/ folder and generates a .png social card for every page that has an og:title meta tag. Images are written to dist/og/<path>.png and wired up as og:image automatically.
Cards are rendered with Satori using a bundled Inter font — no external services, no API keys.
JSON-LD structured data
Every blog post gets a BlogPosting schema. Every docs page gets a TechArticle schema. Fields populated: name, description, datePublished, author.
Head meta tags
The module injects (or fixes) the following on every page:
| Tag | Value |
|-----|-------|
| <title> | De-duplicated (no My Site — My Site) |
| canonical | Full URL from site in astro.config.mjs |
| og:title | Post/doc title |
| og:description | Frontmatter description |
| og:site_name | Site title from karaoke.config.ts |
| og:locale | en_US |
| twitter:card | summary_large_image |
| twitter:title | Post/doc title |
| twitter:description | Frontmatter description |
robots.txt
Injects /robots.txt allowing all crawlers and disallowing /karaoke-cms/ (the dev-only handbook).
Routes
| Pattern | Description |
|---------|-------------|
| /robots.txt | Allows all crawlers, disallows /karaoke-cms/ |
Requirements
Set site: in astro.config.mjs to your production URL for canonical tags and OG images to resolve correctly:
// astro.config.mjs
export default defineConfig({
site: 'https://your-domain.com',
// ...
});What's new in 0.13.1
No user-facing changes in this release.
What's new in 0.11.3
No user-facing changes in this release.
What's new in 0.11.0
- Initial release — OG image generation, JSON-LD structured data,
robots.txt - Title deduplication — fixes
My Site — My Sitein<title>tags - Canonical URLs —
<link rel="canonical">on every page - Rich meta —
og:site_name,og:locale, Twitter card tags - Rich JSON-LD —
datePublishedandauthorfields on article schemas
