<!-- Generated from llms-txt-vue/index.html. The canonical document is the HTML page. -->

- [ Home ](/) 
/
- [ How to create llms.txt ](/how-to-create/) 
/
- Vue (Vite)            
# llms.txt in Vue (Vite)

A Vue 3 app scaffolded with Vite serves llms.txt from the public/ folder with zero configuration.

Last updated: July 26, 2026

## Where the file goes

Vue apps built with Vite (the default tooling since Vue 3) treat the `public/` directory
as static: files there are copied to the build output root and served at the site root during development.
A file at `public/llms.txt` is available at `/llms.txt` with no config.

This works best when the Vue app has stable public routes. If routing is entirely client-side,
make sure the URLs listed in `llms.txt` return meaningful HTML or documentation pages when
fetched directly, not only after JavaScript navigation.

## Method: the public/ folder

- Create the file: `touch public/llms.txt` (the folder already exists in a standard Vite
scaffold). 
- Write your content (see the [how-to guide](/how-to-create/) and [generator](/generator/)):   
```
# Your Site Name

> One-sentence description of your site for LLM context.

## Core pages

- [Page title](https://yourdomain.com/page/): brief description.
- [Docs](https://yourdomain.com/docs/): developer documentation.

```

- Run `npm run dev` to check locally at `http://localhost:5173/llms.txt`,
then `npm run build` and deploy.     
✓ Use root-absolute paths

Reference the file as  /llms.txt , not  /public/llms.txt . Vite strips the
public/  prefix, and assets in  public/  are never processed or hashed, so
the URL stays stable.

## Verifying the setup

After deploying, confirm the file loads and is served as text:

```
curl -sI https://yourdomain.com/llms.txt | grep -i content-type
# expect: content-type: text/plain
```

For a version that inlines full page content, add
[`llms-full.txt`](/llms-full-txt/) the same way. Using Nuxt instead of plain
Vue? See the [Nuxt guide](/llms-txt-nuxt/). Check your file against the
[validator](/validator/) when you are done.

## Sources

- [ Vite docs, the public directory ](https://vite.dev/guide/assets)
- [ llmstxt.org, spec reference ](https://llmstxt.org/)           
On this page

- [ Where the file goes ](#overview)
- [ Method: the public/ folder ](#public)
- [ Verifying the setup ](#verify)
