opencode icon indicating copy to clipboard operation
opencode copied to clipboard

docs: add llms.txt support for improved AI accessibility

Open bstncartwright opened this issue 5 months ago • 0 comments

I wanted to have opencode help me configure AGENTS.md and opencode.json files. I was able to accomplish this by linking it to https://opencode.ai/docs/rules/, but realized it could be a lot more efficient if the site supported llms.txt.

This pull request updates the astro.config.mjs file to integrate the starlight-llms-txt plugin for custom documentation sets. It also updates the package.json file to include the new plugin as a dependency. Below are the key changes:

Sidebar Configuration Improvements:

  • Extracted the sidebar array into a separate constant for reuse, simplifying the configuration and avoiding duplication. (packages/web/astro.config.mjs, [1] [2]

Plugin Integration:

  • Added the starlight-llms-txt plugin to the astro.config.mjs file, enabling the creation of custom documentation sets based on the sidebar structure. This includes filtering out the main "docs" link and generating metadata for each documentation section. (packages/web/astro.config.mjs, packages/web/astro.config.mjsR90-R102)
  • Added starlight-llms-txt version 0.5.1 as a new dependency in package.json. (packages/web/package.json, packages/web/package.jsonR34)

bstncartwright avatar Jul 20 '25 02:07 bstncartwright