Skip to content
New: Customize your theme with an AI assistant. Read the guide

Files: src/config/config.toml, src/i18n/<lang>.json, page frontmatter · Skill level: Beginner

In the Tina and Sanity editions, these settings are in Site settings, and the labels are in Interface labels. Per-page switches differ by edition, and your theme’s What Is Editable In Sanity page says where they are, if it has them.

The theme helps visitors and AI tools read your content. Visitors can open the current page in an AI assistant or copy it as Markdown, and tools can read a plain index of your site. Everything here works from your own content and needs no account.

src/config/config.toml
[settings.pageActions]
enable = true
footer = true
providers = ["chatgpt", "claude", "perplexity", "grok"]
SettingWhat it does
enableShows Copy page and Ask AI links on blog posts and other detail pages
footerShows a row in the footer with links to ask AI about the page, the Markdown copy, and the llms files
providersWhich assistants to offer: any of chatgpt, claude, perplexity, grok. [] hides the “Ask” links

The labels are in each language file, under the ai keys in src/i18n/<lang>.json. Change them in every language.

The llms Files

src/config/config.toml
[seo.ai]
llmsTxt = true
markdownPages = true
AddressWhat it holds
/llms.txtA Markdown index of your site, with a summary and your contact details
/llms-full.txtThe text of your pages in one file
/<page>.mdA Markdown copy of a content page, such as /blog/my-post.md

Each language gets its own, such as /fr/llms.txt and /ar/llms.txt.

llms.txt is a proposed convention that some AI tools and coding agents read. Search engines don’t document using these files, so treat them as a convenience, not as an SEO setting.

Before launch:

  • Write your own site summary in the ai.siteSummary key of each language file.
  • Set your address in [site] baseUrl, because the links in these files use it.

The last line of llms.txt is the theme credit. You can edit the credit under [settings.themeCredit] in config.toml.

Leave A Page Out

Add excludeFromAi to the frontmatter of the page:

---
title: "Internal notes"
excludeFromAi: true
---

The page is left out of the llms files and gets no Markdown copy. Pages marked noindex are left out automatically.

Choose Which AI Crawlers May Visit

/robots.txt is built from your settings:

src/config/config.toml
[seo.robotsTxt]
enable = true
disallow = []
aiSearch = true # AI answer engines that fetch pages to cite them
aiTraining = true # crawlers that collect content to train AI models

Set aiSearch or aiTraining to false to ask those crawlers to stay away. robots.txt is a request, and not every crawler follows it. The list of crawlers is in src/lib/utils/aiCrawlers.ts.

Files For Developers

FileWhat it does
PageActions.astro, under src/layouts/components/The Copy page and Ask AI links
src/layouts/components/global/footer/FooterAi.astroThe footer row
src/lib/utils/aiContent.tsBuilds the text for the llms and .md routes
src/lib/utils/aiCrawlers.tsThe crawler lists for robots.txt
src/pages/[...lang]/llms.txt.tsThe llms.txt route
src/pages/[...lang]/llms-full.txt.tsThe llms-full.txt route
src/pages/[...path].md.tsThe Markdown copies
src/pages/robots.txt.tsThe robots.txt route

Do It With AI

Prepare the AI files for launch. In each file in src/i18n/, write a two-sentence site summary in
the ai.siteSummary key, in that file's language, based on this description: [DESCRIPTION]. Check
that [site] baseUrl in src/config/config.toml is "[MY URL]". Add excludeFromAi: true to these
pages: [PAGES], in every language. Then run npm run build and show me the first lines of
dist/llms.txt.
Type something to search...