SEO and AI search

Found by search engines. Quoted by AI assistants.

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.

llms.txt
# 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…
200 text/markdown · GET /docs/quick-start.md
01

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.

02

Nothing new to fill in

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.

03

Answers assistants can quote

A list of questions and answers becomes an FAQ in the structured data, the format AI assistants lift their answers from.

04

llms.txt

An index of your site for language models, with each page and its description, generated by WordPress or by your build.

05

Every page in Markdown

A page.md next to every page, or Accept: text/markdown on the same address. Agents read your text, not your layout.

06

In every language

Descriptions, questions and structured data follow the translation. The sitemap lists each page's other languages and its date.

Declared in the schema

One block per collection points at fields you already have. Collections → Search and AI sets the same thing without code.

leiho.schema.json
{
  "id": "doc",
  "path": "/docs/{slug}",
  "seo": {
    "type": "TechArticle",
    "description": "summary",
    "image": "cover",
    "faq": "faq"
  },
  "fields": [ … ]
}

One graph per page

Every item of the content API carries its schema.org nodes. leihoGraph() adds your site, organization and breadcrumbs, linked by stable ids.

layout
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>

After the build

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.

astro.config.mjs
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 out

Rendered on request

Next.js or Nuxt on a server: rewrite /llms.txt and /page.md to WordPress. Leiho serves them with the cache of the content API.

Edit the real site.

Free and open source. Try it on a real WordPress, in your browser.