Skip to content

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

  1. starlight-llms-txt is a Starlight plugin. Install it by running the following command in your terminal:

    Terminal window
    npm i starlight-llms-txt
  2. Configure the plugin in your Starlight configuration in the astro.config.mjs file. A site URL 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()],
    }),
    ],
    })
  3. Start the development server:

    Terminal window
    npm run dev
  4. Visit localhost:4321/llms.txt to preview the plugin in action.

Next steps

See the Configuration guide to learn how to adjust the output of the plugin.