Documentation
Docs
Introduction
Getting Started
Tutorial: build an app
Core Concepts
Routing
Server-Side Rendering
Mimir, state management
Pages & Layouts
API Routes
Styling & Theming
Building & Deploying
API Reference
Guides
Recipes
FAQ (use cases)
Reference , ekko:rune/seo
SEO tag, robots, and sitemap generation. Import:
See SEO for the narrative.
createSEO(config) → seo
Config
| Section | Purpose |
|---|---|
site | Base identity: name, url (required), language. |
meta | Default document meta (description, keywords, author, robots, canonical). |
og | Default Open Graph tags. |
twitter | Default Twitter Card tags. |
favicon | Favicon links (ico, svg, apple). |
robots | robots.txt config (allow/disallow, crawlDelay, sitemap, per-agent). |
sitemap | sitemap routes (static routes and/or dynamicRoutes()). |
Returns seo with the methods below.
seo.headTags(overrides?) → string
Returns the <title>/<meta>/<link> HTML for <head>, site defaults merged with per-page overrides.
Override fields: title, description, keywords, author, robots, canonical, url,
og: { type, title, description, image, imageWidth, imageHeight, url, site_name },
twitter: { card, site, title, description, image }.
seo.robotsTxt() → string
The robots.txt body. Serve from an API route:
seo.sitemapXml() → string
The sitemap XML. Serve from an API route:
sitemap.routes are static entries ({ path, lastmod?, changefreq?, priority? }); sitemap.dynamicRoutes
is a function returning more entries (e.g. one per content item).
seo.structuredData(jsonLd) → string
Wraps a JSON-LD object in a safely-escaped <script type="application/ld+json"> tag. Append to a page's
head:
Next: ekko:ssr & ekko:ssr/css.