## Documentation index

This index lists every available documentation page and its Markdown source.

- [Documentation](https://vara.varavel.com/docs/index.md)
  - [Introduction](https://vara.varavel.com/docs/introduction/index.md)
  - [Getting Started](https://vara.varavel.com/docs/getting-started/index.md)
    - [Installation](https://vara.varavel.com/docs/getting-started/installation/index.md)
    - [Quick Start](https://vara.varavel.com/docs/getting-started/quick-start/index.md)
    - [Composing a Landing Page](https://vara.varavel.com/docs/getting-started/composing-landing-page/index.md)
  - [Fundamentals](https://vara.varavel.com/docs/fundamentals/index.md)
    - [Project Structure](https://vara.varavel.com/docs/fundamentals/project-structure/index.md)
    - [Page Generators](https://vara.varavel.com/docs/fundamentals/page-generators/index.md)
    - [Site Settings](https://vara.varavel.com/docs/fundamentals/site-settings/index.md)
    - [Search and LLM Output](https://vara.varavel.com/docs/fundamentals/search-and-llms/index.md)
    - [Customization](https://vara.varavel.com/docs/fundamentals/customization/index.md)
    - [Functions and Filters](https://vara.varavel.com/docs/fundamentals/functions-and-filters/index.md)
  - [Templates](https://vara.varavel.com/docs/templates/index.md)
    - [vara-landing](https://vara.varavel.com/docs/templates/landing/index.md)
    - [vara-docs](https://vara.varavel.com/docs/templates/docs/index.md)
    - [vara-docs-raw](https://vara.varavel.com/docs/templates/docs-raw/index.md)
    - [vara-docs-search-index](https://vara.varavel.com/docs/templates/docs-search-index/index.md)
    - [vara-docs-llms-txt](https://vara.varavel.com/docs/templates/docs-llms-txt/index.md)
    - [vara-docs-llms-full-txt](https://vara.varavel.com/docs/templates/docs-llms-full-txt/index.md)
    - [vara-sitemap-xml](https://vara.varavel.com/docs/templates/sitemap-xml/index.md)
    - [vara-404](https://vara.varavel.com/docs/templates/404/index.md)
  - [Components](https://vara.varavel.com/docs/components/index.md)
    - [Alert](https://vara.varavel.com/docs/components/alert/index.md)
    - [Badge](https://vara.varavel.com/docs/components/badge/index.md)
    - [Button](https://vara.varavel.com/docs/components/button/index.md)
    - [Container](https://vara.varavel.com/docs/components/container/index.md)
    - [Icon](https://vara.varavel.com/docs/components/icon/index.md)
    - [Keyboard Key](https://vara.varavel.com/docs/components/kbd/index.md)
    - [Header](https://vara.varavel.com/docs/components/header/index.md)
    - [Hero](https://vara.varavel.com/docs/components/hero/index.md)
    - [Content Split](https://vara.varavel.com/docs/components/content-split/index.md)
    - [Features](https://vara.varavel.com/docs/components/features/index.md)
    - [Stats](https://vara.varavel.com/docs/components/stats/index.md)
    - [FAQ](https://vara.varavel.com/docs/components/faq/index.md)
    - [Testimonial](https://vara.varavel.com/docs/components/testimonial/index.md)
    - [Carousel](https://vara.varavel.com/docs/components/carousel/index.md)
    - [Call to Action](https://vara.varavel.com/docs/components/cta/index.md)
    - [Footer](https://vara.varavel.com/docs/components/footer/index.md)
  - [Troubleshooting](https://vara.varavel.com/docs/troubleshooting/index.md)


## Documentation content

The documentation for the current page follows, reproduced verbatim.


# Search and LLM Output

Documentation sites built with Vara get three content features out of the box: client-side search, on-demand syntax highlighting, and LLM-friendly Markdown output.

## Client-side search

When `docs_search` is enabled, the docs header shows a search field. Opening it (or pressing `Ctrl`/`Cmd` + `K`) runs a full-text search over your documentation, entirely in the browser.

### How the index works

At build time, the `vara-docs-search-index` template produces a JSON index. The theme builds it from every `vara-docs` page under the docs root, storing the title, description, and rendered content of each page.

The search UI loads the index lazily - the first time you hover or focus the search field - and builds a MiniSearch engine from it in the background. Queries match page titles and section headings, with fuzzy matching for longer terms.

### Customizing what gets indexed

Exclude a page from search with `disable_search: true` in its frontmatter. Pages marked as drafts are not generated at all.

### When the index is missing

The search dialog shows a clear error if the index cannot be loaded. That happens when your generator does not create the search index route. Make sure it produces a page with the `vara-docs-search-index` template at `docs_search_index_permalink` (default `/docs/vara-docs-search-index.json`), or disable search with `docs_search: false`.

## Syntax highlighting

Code blocks are highlighted on demand with the `github-light` and `github-dark` themes, following the site's active theme. Vara overrides their backgrounds to match the theme's surfaces and renders that background while the highlighter loads, so blocks never flash unstyled.

The language of each code fence is detected from its rendered `language-*` class and loaded only when needed:

````md
```js
const answer = 42;
```
````

Extra languages beyond Shiki's bundled set can be added with `docs_shiki_custom_languages`. The entry's `id` must match the code fence language.

Highlighted blocks include a copy button that appears on hover. It is wired to the clipboard API and disabled automatically when the clipboard is unavailable.

To disable highlighting entirely, set `docs_shiki: false`.

## Markdown actions

Every documentation page that has content shows a **"Ask AI"** menu next to the table-of-contents toggle. From it you can:

- Open the page's Markdown source in an AI assistant: ChatGPT, Claude, Grok, Perplexity, or DeepSeek.
- Copy a ready-made prompt for asking about the page.
- Copy, view, or download the raw Markdown.

These actions rely on the raw Markdown version of each page (`vara-docs-raw`), so they only appear when your generator produces it. They are tied to the `docs_llms` setting - set it to `false` to hide both the menu and the "Agents" sidebar section.

## llms.txt output

Vara generates two plain-text files that describe your documentation for LLMs:

| File            | Contents                                                                                                    |
| --------------- | ----------------------------------------------------------------------------------------------------------- |
| `llms.txt`      | A hierarchical index of every documentation page, with absolute links to each page and its Markdown source. |
| `llms-full.txt` | The same index followed by the complete content of every page, reproduced verbatim.                         |

Both are generated from the `vara-docs-raw` pages under the docs root, in the same order the sidebar uses. Their routes are `/docs/llms.txt` and `/docs/llms-full.txt` by default, and they appear under the **Agents** section in the sidebar.

`docs_llms_index` controls whether each individual `vara-docs-raw` page also prepends a small index before its own content. This is useful when a single Markdown file is handed to an assistant directly.
