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

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

Margo helps visitors and AI tools read your content. Visitors can ask an AI assistant about the current page or read 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 a Copy page menu next to Copy link at the end of each journal post: copy the post as Markdown, open its Markdown copy, or ask an assistant about it
footerShows a row at the bottom of every footer layout: Ask AI about this page with one link per assistant, and Read with AI with this page’s Markdown copy, llms.txt, and llms-full.txt
providersWhich assistants to offer: any of chatgpt, claude, perplexity, grok. [] hides the “Ask” links

Copying a page and its Markdown link need markdownPages below; the llms links need llmsTxt. The labels are under ai in each src/i18n/<language>.json, for example ai.copyPage (“Copy page”) and ai.footerAsk (“Ask AI about this page”). 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: your title and description, a short summary, then links to your pages, projects, services, journal posts, and team, and your contact details
/llms-full.txtThe text of your pages in one file
/<page>.mdA Markdown copy of a project, service, journal post, team member, legal page, or the pricing and FAQ pages, such as /projects/ceramic-forms.md

Each language gets its own, such as /fr/llms.txt and /ar/llms.txt. Pages with a Markdown copy also point to it from their <head>, so tools can find it.

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 file in src/i18n/. It ships with a sample that describes an independent designer and photographer.
  • Set your address in [site] baseUrl, because the links in these files use it.
  • Check [settings.contactInfo] in config.toml. The contact details in llms.txt come from its phone, email, and address, which ship as sample values. The theme’s page layouts don’t show phone and address, but llms.txt does, so replace them or leave them empty ("").

The last line of llms.txt is the theme credit, editable in config.toml under [settings.themeCredit].

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 and drafts are left out automatically. The sample shortcode page /components/ ships with excludeFromAi: true.

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 also gets a Content-Signal line that states the same two choices. 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
src/layouts/components/widgets/PageActions.astroThe Copy page menu on journal posts
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 of my Margo site 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]", and set phone,
email, and address in [settings.contactInfo] to [MY DETAILS, or "" to leave one out]. 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...