ข้ามไปยังเนื้อหา

Starlight llms.txt Plugin

เนื้อหานี้ยังไม่มีในภาษาของคุณ

The starlight-llms-txt plugin integrates with Astro Starlight to generate standard-compliant llms.txt and llms-full.txt feeds. These endpoints provide large language model (LLM) agents, crawlers, and AI developer tools with structured, token-efficient, and federated documentation context.

Standard Compliance

Generates structured /llms.txt files conforming to the emerging LLM context standard with curated link sections.

Full Content Concatenation

Builds single-file /llms-full.txt feeds stripped of UI boilerplate, navigation bars, and HTML noise.

Multi-Locale Routing

Automatically produces localized feeds (e.g., /ja/llms.txt, /ko/llms-full.txt) matching your Starlight locales.

Federated Sites Integration

Aggregates remote documentation endpoints across modular multi-repo ecosystems via llms-federated-sites.json.

+-------------------------------------------------------------------------+
| Astro Starlight Build Engine |
| |
| +-----------------------+ +-------------------------------------+ |
| | Markdown/MDX Content | | starlight-llms-txt Integration Hook | |
| +-----------+-----------+ +------------------+------------------+ |
| | | |
| v v |
| +-----------------------+ +-------------------------------------+ |
| | Clean Markdown AST | --> | llms.txt / llms-full.txt Generator | |
| | (Stripped Frontmatter)| | (Tier Trees & Federated Federation) | |
| +-----------------------+ +------------------+------------------+ |
+---------------------------------------------------|---------------------+
|
v
+-------------------------------------------------------------------------+
| Generated Static Endpoints |
| /llms.txt | /llms-full.txt | /llms-small.txt | /llms-tiered.txt |
+-------------------------------------------------------------------------+

Install the package into your Starlight project:

Terminal window
npm install @f5-sales-demo/starlight-llms-txt

Add the plugin to your astro.config.mjs:

import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLlmsTxt from '@f5-sales-demo/starlight-llms-txt';
export default defineConfig({
integrations: [
starlight({
title: 'Example Documentation',
plugins: [
starlightLlmsTxt({
description: 'Technical documentation for Example Corp cloud services.',
details: 'Includes architecture guides, CLI references, and API specifications.',
promote: ['getting-started', 'architecture'],
demote: ['archive', 'deprecated'],
}),
],
}),
],
});