/ llmtxt.info

llms.txt in Vue (Vite)

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

Last updated:

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

  1. Create the file: touch public/llms.txt (the folder already exists in a standard Vite scaffold).
  2. Write your content (see the how-to guide and 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.
  1. Run npm run dev to check locally at http://localhost:5173/llms.txt, then npm run build and deploy.

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 the same way. Using Nuxt instead of plain Vue? See the Nuxt guide. Check your file against the validator when you are done.

Sources