Skip to content

Include section-level optionalLinks in llms.txt - #33

Open
taylorreece wants to merge 2 commits into
signalwire:mainfrom
taylorreece:fix/section-optional-links
Open

Include section-level optionalLinks in llms.txt#33
taylorreece wants to merge 2 commits into
signalwire:mainfrom
taylorreece:fix/section-optional-links

Conversation

@taylorreece

Copy link
Copy Markdown
Contributor

Section-level optionalLinks were parsed and validated but never read by anything that produced output — only global llmsTxt.optionalLinks were rendered.

This can be seen in the example repo - if you build website/, these links (https://github.com/signalwire/docusaurus-plugins/blob/main/website/docusaurus.config.ts#L115-L125) don't appear in llms.txt.

This change ensures those links are included.

Description

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Code cleanup / refactor

Related Issues

Testing

  • Added/updated unit tests
  • Tested manually
  • Tested with live SignalWire credentials (if applicable)

Checklist

  • I have read the CONTRIBUTING guidelines
  • My code follows the project's style guidelines
  • I have added tests for my changes (if applicable)
  • I have updated documentation (if applicable)
  • All existing tests pass

Additional Notes

Section-level `optionalLinks` were parsed and validated but never read by
anything that produced output — only global `llmsTxt.optionalLinks` were
rendered.

- Carry section optionalLinks through ProcessedSection onto TreeNode
- Render them in the section listing, after the section's documents
- Seed sections (and their ancestors) that define only optional links so
  they are not skipped for having no matching routes
- Keep sections with optional links or content-bearing descendants in
  filterValidSections instead of only checking docs.length
- Stop reporting a links-only section as an empty-section quality issue,
  which would throw under onSectionError: 'throw'

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant