# How to optimize llms.txt | Creght API for AI

> Learn how to organize, prioritize, and exclude pages in llms.txt with the llms configuration in talizen.config.ts.

[![Creght](https://ugc.talizen.com/_assets/site/2061660904709165056/1780797461299__creght_logo.png)API for AI](/)

[View llms.txt](/llms.txt)

Overview

- [Creght API for AI](/api)

Discoverability

- [How to optimize llms.txt](/api/optimize-llms-txt)

Site configuration

- [Implement domain-based locale routing](/api/domain-locale-routing)

On this page

- [Why structure matters](#why-structure-matters)
- [Recommended configuration](#recommended-configuration)
- [How matching works](#how-matching-works)
- [Exact paths](#exact-paths)
- [Prefix wildcards](#prefix-wildcards)
- [First match wins](#first-match-wins)
- [Exclusions win first](#exclusions-win-first)
- [Add site context](#add-site-context)
- [Verification checklist](#verification-checklist)

Discoverability/How to optimize llms.txt

# How to optimize llms.txt

Turn a flat list of URLs into a concise, prioritized map that helps AI systems find the right Creght pages first.

Copy Markdown link

Creght automatically serves `/llms.txt` and a Markdown version of every indexed page. The URL inventory comes from the same source as the sitemap, while the `llms` field controls how those URLs are presented to an AI reader.

## Why structure matters

Without configuration, every page appears in one alphabetically sorted `Pages` section. That is a safe default, but it gives a pricing page, a key implementation guide, and a minor legal page equal prominence.

A better file puts high-value product and documentation pages first, groups related content, and removes pages that are duplicated, obsolete, private in intent, or too weak to help an AI answer accurately.

## Recommended configuration

Add `llms` at the top level of `talizen.config.ts`. The following configuration prioritizes core pages and AI documentation, keeps the blog together, and marks legal content as optional.

```
export default {
  llms: {
    sections: [
      { name: 'Core pages', pages: ['/', '/ai', '/price', '/creght-vs-fkw', '/creght-vs-sxl'] },
      { name: 'AI website docs', pages: ['/docs/ai/*'] },
      { name: 'Blog', pages: ['/blogs/*'] },
      { name: 'Optional', pages: ['/legal/*', '/tuikuan'] },
    ],
    exclude: [
      '/docs/pxrp79jqtnyq',
      '/blogs/o8e12bemmru6',
      '/blogs/pc3r8bxa0m72',
    ],
  },
}
```

Section names are emitted exactly as written, so use labels that make sense to the AI audience for your site. The name `Optional` has special placement semantics and is conventionally used for links an AI can skip when context is limited.

## How matching works

### Exact paths

A pattern such as `/price` matches only `/price`. A leading slash may be omitted, but including it is clearer.

### Prefix wildcards

A trailing `/*` matches the prefix page and every child path. `/docs/ai/*` matches `/docs/ai` and `/docs/ai/guide`, but not `/docs/ai-tools`.

### First match wins

A page is assigned to the first matching section. Put narrow, high-priority sections before broad catch-all patterns.

### Exclusions win first

The exclude list is checked before sections. A matching page is omitted even if it also matches a section pattern.

Inside a section, the order of patterns in `pages` is the primary sort order. URLs matched by the same pattern are sorted alphabetically. Empty sections are not rendered.

Pages that match no configured section are preserved in an automatic `Pages` section. If an `Optional` section exists, this fallback section is inserted immediately before it; otherwise it appears last.

## Add site context

Use `details` for a short Markdown briefing that should be available before an AI follows any page link. Keep it factual, stable, and compact: what the product is, which documentation is authoritative, and any important terminology.

```
llms: {
  details: `Creght is a visual and AI website builder.
Use the AI website docs for implementation guidance.
Use core pages for product and pricing facts.`,
  sections: [/* ... */],
}
```

The generated file already starts with the site title and `metadata.description`. Do not repeat those verbatim in `details`; use the space for context that improves routing and interpretation.

## Verification checklist

- Open `/llms.txt` on the deployed domain and confirm the most important section appears first.
- Follow several generated `.md` links, including `/index.md` for the home page, and verify the content is useful without browser-only UI.
- Check that wildcard patterns do not unintentionally absorb a more specific section.
- Confirm excluded URLs are absent and unclassified pages still appear under `Pages`.
- Keep `Optional` last so constrained AI readers can safely deprioritize it.

**Result**

A strong `llms.txt` is intentionally smaller in cognitive load, not necessarily smaller in page count. Give AI systems a clear path from product facts to implementation guidance, then move low-priority material out of the way.

![Creght](https://ugc.talizen.com/_assets/site/2061660904709165056/1780797461299__creght_logo.png)

This website is built with [Creght](/)

[Discord](https://discord.gg/Qvq2nmZNnb)

## Links

- [Pricing](/price)
- [Help Center](/help)
- [Contact Us](/contact)
- [Blog](/blogs)
- [Refund Policy](/tuikuan)

## Resources

- [All Resources](/resources)
- [Templates](/templates)
- [Components](https://creghtlib.site.creght.com)
- [Animations](/effects)
- [Figma to Creght](/figma2creght)
- [API for AI](/api)

## Terms

- [Terms of Service](/legal/terms)
- [Privacy Policy](/legal/privacy)
- [Acceptable Use Policy](/legal/acceptable-use)

## Social Media

- [Twitter](https://twitter.com)
- [Facebook](https://www.facebook.com)
- [LinkedIn](https://www.linkedin.com)

[蜀ICP备2023038192号-2](https://beian.miit.gov.cn)
