Skip to content

fix: ensure llms txt links are rewritten - #516

Merged
chance-coleman merged 2 commits into
mainfrom
fix-llms-txt-links
Nov 4, 2026
Merged

chance-coleman merged 2 commits into
mainfrom
fix-llms-txt-links

Conversation

@mjnagel

@mjnagel mjnagel commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Currently the generated llms txt will emit broken links due to the way links are rewritten for multi-product/version support. For example on https://docs.defenseunicorns.com/llms-small.txt an example related documentation link is:

- [Create a UDS Package](/how-to-guides/packaging-applications/create-uds-package/) - end-to-end guide for packaging an application as a UDS Package.

This leads to a 404, where the correct link requires /core in front of the link.

This PR addresses this by rewriting links before generating the llms txt.

@mjnagel mjnagel self-assigned this Nov 4, 2026
@netlify

netlify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for uds-product-docs ready!

Name Link
🔨 Latest commit 02fc93f
🔍 Latest deploy log https://app.netlify.com/projects/uds-product-docs/deploys/6aeaa35443e66f2edc0f684d
😎 Deploy Preview https://deploy-preview-516--uds-product-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mjnagel
mjnagel marked this pull request as ready for review November 4, 2026 13:00
@mjnagel
mjnagel requested a review from a team as a code owner November 4, 2026 13:00
@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

The PR rewrites links in copied Markdown and MDX before Astro builds the site, so raw LLM exports receive product and version prefixes.

  • Copied docs get product and release prefixes on internal links.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Copied Markdown and MDX] --> B[Rewrite renamed directory links]
  B --> C[Apply product and version link rules]
  C --> D[Save rewritten source]
  D --> E[Astro site build]
  D --> F[Raw LLM exports]
Loading

Reviews (1) · Last reviewed commit: "Merge branch 'main' into fix-llms-txt-li..." · Reviewed by Greptile

@chance-coleman
chance-coleman merged commit 9c5ec5b into main Nov 4, 2026
9 checks passed
@chance-coleman
chance-coleman deleted the fix-llms-txt-links branch November 4, 2026 21:25
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.

3 participants