Getting Started
starlight-llms-txt is a plugin for the Starlight documentation website framework that auto-generates llms.txt, llms-full.txt, and llms-small.txt context files for large language models based on your documentation site’s content.
You can learn more about llms.txt files at llmstxt.org.
Prerequisites
You will need to have a Starlight website set up. If you don’t have one yet, you can follow the “Getting Started” guide in the Starlight docs to create one.
Installation
-
starlight-llms-txtis a Starlight plugin. Install it by running the following command in your terminal:Terminal window npm i starlight-llms-txtTerminal window pnpm add starlight-llms-txtTerminal window yarn add starlight-llms-txt -
Configure the plugin in your Starlight configuration in the
astro.config.mjsfile. AsiteURL is also required if you haven’t already set this:astro.config.mjs import starlight from '@astrojs/starlight'import { defineConfig } from 'astro/config'import starlightLlmsTxt from 'starlight-llms-txt'export default defineConfig({site: 'https://example.com/',integrations: [starlight({title: 'My Docs',plugins: [starlightLlmsTxt()],}),],}) -
Terminal window npm run devTerminal window pnpm run devTerminal window yarn run dev -
Visit
localhost:4321/llms.txtto preview the plugin in action.
Next steps
See the Configuration guide to learn how to adjust the output of the plugin.