LLMS.txt
SolidBase can generate an llms.txt index plus markdown versions of your routes for LLM tooling, AI assistants, and other machine-readable documentation consumers.
Enable the feature
Turn it on with the llms option in your SolidBase config:
import { createSolidBase, defineTheme } from "@kobalte/solidbase/config";import defaultTheme from "@kobalte/solidbase/default-theme";
const theme = defineTheme({ componentsPath: import.meta.resolve("./src/solidbase-theme"), extends: defaultTheme,});
const solidBase = createSolidBase(theme);
export default { ...solidBase.startConfig({ ssr: true, }), plugins: [ solidBase.plugin({ title: "My Docs", description: "Documentation for my project", llms: true, themeConfig: { sidebar: { "/": [ { title: "Guide", items: [ { title: "Getting Started", link: "/guide/getting-started" }, ], }, ], }, }, }), ],};Once enabled, the build emits:
llms.txtat the site root- one
.mdfile per markdown route, such asindex.mdandguide/getting-started.md
Default theme page actions
When you use the default theme, enabling llms: true also adds a page-level copy button that copies the generated markdown for the current page.
solidBase.plugin({ llms: true,});The button uses the same generated .md output that powers llms.txt, so the copied content stays aligned with the markdown artifacts emitted by the build.
If you're building a custom theme, you can reuse the same behavior from the client API instead of copying the default theme implementation:
import { useCopyPageMarkdown } from "@kobalte/solidbase/client";The hook exposes copy state, in-flight state, and page eligibility so custom themes can provide their own UI while keeping the same LLMS-backed behavior.
What goes into llms.txt
SolidBase builds the index from your docs metadata:
- the document title comes from frontmatter
title - the description comes from frontmatter
description - the list order follows
themeConfig.sidebarwhen a sidebar is configured - if no sidebar is available, SolidBase falls back to a flat list of discovered documents
The generated links point to the emitted markdown files, for example /guide/getting-started.md.
Generated markdown output
Each emitted markdown file is derived from the source route and passed through the document markdown pipeline. That means:
- frontmatter metadata is removed from the final file
- inline frontmatter expressions like
{frontmatter.title}are rendered to plain text when possible - markdown transforms such as
[[toc]], imported code snippets, and GitHub-style alerts are preserved in the generated document output
Excluding pages
You can keep individual pages out of the LLMS output with page frontmatter:
---title: Aboutllms: exclude: true---You can also disable it entirely for a page with llms: false.
Pages are only included when they live under src/routes and are written as .md or .mdx files.
Last updated: 4/1/26, 11:29 PM