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
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;# 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 namesummarystring · requiredThe llms.txt quote under the title, and the AboutPage descriptionbaseUrlstring · requiredThe prefix for every route link. The build warns while it's still example.comroutes{ path, description, pageType? }[]The Key Routes list, and which pages get JSON-LDexternalLinks{ title, url, description? }[]A Resources listsections{ heading, content }[]Extra sections, each under its own headingorganization{ name, description?, url?, logo?, foundingDate? }The Organization inside the About page's JSON-LDNothing 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 descriptionsMiddlewareOnly what you pass as
ontoMiddleware(req, config)Serves a fresh /llms.txt to agents, ?onto and Markdown requests; the scaffolded middleware already passes itOntoProviderOnly the
config propUses routes' pageType and organization for JSON-LDPage types
[05]pageTypeOntoProvider adds
aboutAn AboutPage, with your organization inside itscoringA fixed HowTo describing Onto's own scoring method — only meaningful on an Onto sitedefaultNothing. Also what you get when pageType is left outRoutes 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.