SEO & metadata
New to this? Copy the prompt and paste it into Claude Code — it walks you through the whole setup and tells you what to put where.
Your domain should be the one that ranks. The helpers below point every canonical URL at your site, and the copy on Rill points back at you.
Page metadata
import { postMetadata } from '@rillpage/sdk/next'
const seo = {
siteUrl: 'https://example.com',
pathTemplate: '/writing/:slug',
siteName: 'example.com',
authorName: 'Your Name',
}
export async function generateMetadata({ params }) {
const post = await rill.posts.get((await params).slug)
return post ? postMetadata(post, seo) : {}
}Title, description, canonical URL, Open Graph and Twitter tags. Each value falls back through the post's explicit SEO override, then its own fields, then an excerpt — so the common case needs no configuration.
One trap worth knowing: passing images: undefined is not the same as omitting the key. It suppresses Next's file-based opengraph-image convention entirely, so a generated card is built and then never referenced.
Structured data
Pass seo to RillArticle and it emits schema.org Article JSON-LD, including the commits a post came from as citation entries — provenance no other CMS can give you.
<RillArticle post={post} seo={seo} />Sitemap
// app/sitemap.ts
import { postsSitemap } from '@rillpage/sdk/next'
export default async function sitemap() {
return postsSitemap(rill, seo)
}When a post lives on Rill too
Set a canonical URL on the post and the copy hosted on Rill will point at your domain instead of competing with it in search results.
Next: Instant publishing