Structured data from your fields
Say what an entry is, an article, a product, an event, and which fields hold its description, image and questions. Leiho writes the schema.org JSON-LD.
SEO and AI search
Leiho turns the fields you already have into what search engines and AI assistants read: schema.org structured data, descriptions, questions and answers, llms.txt and a Markdown version of every page, in every language.
# Leiho
> Your Next.js or Astro site, editable inside WordPress.
## Docs
- [Quick start](https://leiho.dev/docs/quick-start.md): Install the plugin, connect your site, annotate your markup.
- [Collections](https://leiho.dev/docs/collections.md): Define content types and fields in Leiho.
## Comparisons
- [Leiho vs Sanity: headless CMS comparison](https://leiho.dev/compare/sanity.md): Hosted content platform…Say what an entry is, an article, a product, an event, and which fields hold its description, image and questions. Leiho writes the schema.org JSON-LD.
No SEO tab for editors to forget. The description is the summary they already write; without one, Leiho reads Yoast, Rank Math or SEOPress, then the excerpt.
A list of questions and answers becomes an FAQ in the structured data, the format AI assistants lift their answers from.
An index of your site for language models, with each page and its description, generated by WordPress or by your build.
A page.md next to every page, or Accept: text/markdown on the same address. Agents read your text, not your layout.
Descriptions, questions and structured data follow the translation. The sitemap lists each page's other languages and its date.
One block per collection points at fields you already have. Collections → Search and AI sets the same thing without code.
{
"id": "doc",
"path": "/docs/{slug}",
"seo": {
"type": "TechArticle",
"description": "summary",
"image": "cover",
"faq": "faq"
},
"fields": [ … ]
}Every item of the content API carries its schema.org nodes. leihoGraph() adds your site, organization and breadcrumbs, linked by stable ids.
import { leihoGraph, jsonLd } from 'leiho/seo';
const graph = leihoGraph({
url, item,
site: { url: 'https://example.com', name: 'Example' },
breadcrumbs: [{ name: 'Docs', url: '/docs' }, { name: item.title }],
});
// <script type="application/ld+json">{jsonLd(graph)}</script>A static site gets page.md for every page, llms.txt and llms-full.txt per language, and a sitemap with hreflang. One line in Astro, one command elsewhere.
import { aiReady } from 'leiho/ai-ready';
export default defineConfig({
site: 'https://example.com',
integrations: [aiReady()],
});
// Elsewhere: npx leiho ai-ready --site https://example.com --dir outNext.js or Nuxt on a server: rewrite /llms.txt and /page.md to WordPress. Leiho serves them with the cache of the content API.
Free and open source. Try it on a real WordPress, in your browser.