# `Astral.Plugin.LLMs`
[🔗](https://github.com/elixir-volt/astral/blob/v0.7.0/lib/astral/plugin/llms.ex#L1)

Generates a metadata-driven `/llms.txt` index, without exporting page content.

By default, lists HTML pages and generated HTML routes in URL order. Generated
routes take precedence over pages at the same output destination, as in builds.
Drafts, error pages, and metadata declaring `noindex: true`, `robots: "noindex"`,
or `llms: false` are omitted. Exclusion is guidance, not access control.

## Options

  * `:title` — required site name. Never inferred from the Mix application name.
  * `:description` — optional short site summary.
  * `:site_url` — optional absolute HTTP(S) site URL. Without it links are root-relative.
  * `:exclude` — route paths to omit, with trailing slashes treated equivalently.
  * `:sections` — ordered `{heading, selectors}` pairs. When omitted, a single
    `"Pages"` section lists all eligible routes. An empty list produces no sections.

A selector is a local route path, `{:collection, name}`, or a map containing
`:url` and optional `:title`/`:description` overrides. External HTTP(S) URLs
require a title. Local links infer their titles and descriptions from metadata;
a page's first level-one Markdown heading is a title fallback, followed by its
route path (`"Home"` for `/`). Unknown local paths and collections raise errors.
Explicit selection never bypasses exclusions. Empty sections are omitted.

    plugin Astral.Plugin.LLMs,
      title: "My site",
      sections: [
        {"Pages", ["/", "/about/"]},
        {"Writing", [{:collection, :posts}]},
        {"Optional", [%{title: "Source", url: "https://github.com/example/site"}]}
      ]

This plugin writes only `llms.txt`. It does not render, convert, or concatenate
page bodies, generate Markdown alternates, or alter HTML layouts.

# `name`

Return the plugin identifier.

# `render_route`

Render the index from the final discovered route table in builds and development.

# `routes`

Register the llms.txt route after validating site-level options.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
