Configuration[01]

Configuration

onto.config.ts — written for you by onto-next init. It describes your site to agents: it becomes your llms.txt, and feeds the JSON-LD OntoProvider adds.

Try it

[02]

Edit the config and watch the llms.txt it builds:

routes
onto.config.ts
import type { OntoConfig } from '@ontosdk/next/config';

const config: OntoConfig = {
  name: 'Acme',
  summary: 'Payment infrastructure for the internet.',
  baseUrl: 'https://acme.com',
  routes: [
    { path: '/', description: 'Homepage and product overview' },
    { path: '/pricing', description: 'Plans and what each includes' },
    { path: '/docs', description: 'Developer documentation' },
  ],
  externalLinks: [{ title: 'Status', url: 'https://status.acme.com' }],
  sections: [{ heading: 'Contact', content: 'support@acme.com' }],
};

export default config;
/llms.txt
# Acme

> Payment infrastructure for the internet.

## Key Routes

- [/](https://acme.com/): Homepage and product overview
- [/pricing](https://acme.com/pricing): Plans and what each includes
- [/docs](https://acme.com/docs): Developer documentation

## Resources

- [Status](https://status.acme.com)

## Contact

support@acme.com

Every field

[03]
FieldTypeBecomes
namestring · requiredThe llms.txt title, and the AboutPage name
summarystring · requiredThe llms.txt quote under the title, and the AboutPage description
baseUrlstring · requiredThe prefix for every route link. The build warns while it's still example.com
routes{ path, description, pageType? }[]The Key Routes list, and which pages get JSON-LD
externalLinks{ title, url, description? }[]A Resources list
sections{ heading, content }[]Extra sections, each under its own heading
organization{ name, description?, url?, logo?, foundingDate? }The Organization inside the About page's JSON-LD

Nothing has a default: leave a list out and its section is left out.

Where it's read

[04]
Read byHowWatch for
Build CLIImports it to write public/llms.txtIf the import fails it falls back to a simpler read that keeps only name, summary, baseUrl and route paths and descriptions
MiddlewareOnly what you pass as ontoMiddleware(req, config)Serves a fresh /llms.txt to agents, ?onto and Markdown requests; the scaffolded middleware already passes it
OntoProviderOnly the config propUses routes' pageType and organization for JSON-LD

Page types

[05]
pageTypeOntoProvider adds
aboutAn AboutPage, with your organization inside it
scoringA fixed HowTo describing Onto's own scoring method — only meaningful on an Onto site
defaultNothing. Also what you get when pageType is left out

Routes match by exact path — /blog/* never matches. There's no way to supply your own JSON-LD through the config; for that, write the <script type="application/ld+json"> yourself. More on OntoProvider.