opencode
opencode copied to clipboard
docs: add llms.txt support for improved AI accessibility
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-txtplugin to theastro.config.mjsfile, 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-txtversion0.5.1as a new dependency inpackage.json. (packages/web/package.json, packages/web/package.jsonR34)