# AI Links & llms Files

## AI Links & llms Files

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

Covena helps visitors and AI tools read your content. Every footer has a row where visitors can ask an AI assistant about the page they're on, or open the page as plain Markdown. AI tools can read a plain index of your site. All of it is built from your own content and needs no account.

### The Ask AI Row In The Footer
```toml
# src/config/config.toml
[settings.pageActions]
  enable    = true
  footer    = true
  providers = ["chatgpt", "claude", "perplexity", "grok"]
```

| Setting | What it does |
| --- | --- |
| `enable`, `footer` | Both `true` shows the row. Set either to `false` to hide it |
| `providers` | Which assistants to offer: any of `chatgpt`, `claude`, `perplexity`, `grok`. `[]` hides the "Ask" links and keeps the file links |

The row has two parts:

- **Ask AI about this page:** each link opens the assistant with a question about the current page. The question is `ai.prompt` in `src/i18n/<lang>.json`, "Read `{url}` and answer my questions about it."
- **Read with AI:** links to this page's Markdown copy (where it has one), `llms.txt`, and `llms-full.txt`.

The labels are under `ai` in each `src/i18n/<lang>.json`: `footerAsk`, `footerRead`, and `footerMarkdown`. Change them in every language.

### The llms Files
```toml
# src/config/config.toml
[seo.ai]
  llmsTxt       = true
  markdownPages = true
```

| Address | What it holds |
| --- | --- |
| `/llms.txt` | A Markdown index of your site: a summary, your phone, email, and address, then links to every page, grouped (pages, practice areas, industries, results, attorneys, offices, insights, open roles) |
| `/llms-full.txt` | The text of your pages in one file |
| `/<page>.md` | A Markdown copy of a page, such as `/practice-areas/employment.md` |

Markdown copies are built for practice areas, industries, results, attorney profiles, offices, insights, open roles, the FAQ, fees, and reviews pages, and the legal pages. Each language gets its own files, 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 an SEO setting.

Before launch:

- Write your own summary in `ai.siteSummary` in each `src/i18n/<lang>.json`. It opens `llms.txt`. The demo one describes Covena Law's three offices.
- Set `[site] baseUrl`, because the links in these files use it.
- The phone and email come from `[settings.contactInfo]`, and the address from `contactInfo.address` in each language file.

The last line of `llms.txt` is the theme credit. `[settings.themeCredit]` turns it off along with the footer credit.

### Leave A Page Out
Add `excludeFromAi` to the page's frontmatter:

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

The page is left out of the llms files and gets no Markdown copy. Pages with `noindex` in `robots`, and drafts in the production build, are left out automatically.

### Choose Which AI Crawlers May Visit
`/robots.txt` is built from your settings:

```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 carries a `Content-Signal` line with the same choices. It is a request, and not every crawler follows it. The list of crawler names is in `src/lib/utils/aiCrawlers.ts`.

<Aside type="note">
  The included `public/_headers` (Netlify and Cloudflare Pages), `vercel.json`,
  and `public/.htaccess` (Apache) serve the `.md` and llms files as text, and
  send `X-Robots-Tag: noindex` with the `.md` copies so search engines don't list
  them in place of your real pages. On any other host, set the same headers
  yourself. See [Deployment](/covena/deployment/).
</Aside>

### Files For Developers
| File | What it does |
| --- | --- |
| `src/layouts/components/global/footer/FooterAi.astro` | The footer row |
| `src/lib/utils/aiContent.ts` | Builds the text for the llms files and `.md` copies |
| `src/lib/utils/aiCrawlers.ts` | The crawler lists for `robots.txt` |
| `src/pages/[...lang]/llms.txt.ts` | The `llms.txt` route |
| `src/pages/[...lang]/llms-full.txt.ts` | The `llms-full.txt` route |
| `src/pages/[...path].md.ts` | The Markdown copies |
| `src/pages/robots.txt.ts` | The `robots.txt` route |

### Do It With AI
```text
Prepare the AI files of this Covena site for launch. In each file in src/i18n/, write a
two-sentence summary of my firm 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 in every language: [PAGES]. Then run
npm run build and show me the first lines of dist/llms.txt.
```