Skip to content

Fix docs llms index links#6412

Merged
Alek99 merged 1 commit intomainfrom
codex/fix-llms-docs-index
Apr 28, 2026
Merged

Fix docs llms index links#6412
Alek99 merged 1 commit intomainfrom
codex/fix-llms-docs-index

Conversation

@Alek99
Copy link
Copy Markdown
Member

@Alek99 Alek99 commented Apr 28, 2026

Summary

  • Add the proposed llms.txt structure with an H1 and blockquote summary.
  • Add a hidden docs-page blockquote directive that points agents to llms.txt.
  • Restore the llms-full.txt option in the docs copy/LLM dropdown using the app-relative href so it resolves correctly under /docs.

Validation

  • uv run pytest tests/test_agent_files.py
  • Ran the docs app locally and verified /docs/llms-full.txt loads as the full generated docs file after clearing the dev whitelist.

@Alek99 Alek99 changed the title [codex] Fix docs llms index links Fix docs llms index links Apr 28, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 28, 2026

Merging this PR will not alter performance

βœ… 9 untouched benchmarks


Comparing codex/fix-llms-docs-index (c6e60d5) with main (21406ab)

Open in CodSpeed

@Alek99 Alek99 marked this pull request as ready for review April 28, 2026 20:46
@Alek99 Alek99 requested a review from a team as a code owner April 28, 2026 20:46
@Alek99 Alek99 requested a review from carlosabadia April 28, 2026 20:47
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR improves the llms.txt/llms-full.txt structure for agent-friendly docs: it adds an H1 and blockquote preamble to llms.txt, restores the "llms-full.txt" menu item in the copy/LLM dropdown, and inserts a hidden sr-only blockquote on every doc page pointing bots to llms.txt. The plugin logic and tests are clean and consistent.

Confidence Score: 4/5

Safe to merge with low risk; the single concern is whether root-relative paths resolve correctly when the docs are mounted under /docs/.

All plugin logic and tests are correct. The only open question is the /llms-full.txt and /llms.txt hrefs in docpage.py β€” if Reflex does not prefix rx.el.a hrefs with the configured frontend_path, both links 404 in production, but the author claims local verification passed.

docs/app/reflex_docs/templates/docpage/docpage.py β€” verify LLMS_TXT_PATH and LLMS_FULL_TXT_PATH resolve to the correct /docs/-prefixed URLs in production.

Important Files Changed

Filename Overview
docs/app/agent_files/_plugin.py Adds LLMS_TXT_INTRO constant with H1 + blockquote summary (linking to llms-full.txt) and updates generate_llms_txt to use it; logic and formatting are correct and match the updated test assertions.
docs/app/reflex_docs/templates/docpage/docpage.py Adds LLMS_TXT_PATH / LLMS_FULL_TXT_PATH constants, a new "llms-full.txt" menu item, and a sr-only blockquote pointing to llms.txt; both constants use root-relative paths (/llms.txt, /llms-full.txt) that may not resolve under /docs/ in production.
docs/app/tests/test_agent_files.py Test updated to assert the new intro format including the H1, blockquote, and llms-full.txt URL; assertions are accurate and complete.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[AgentFilesPlugin.get_static_assets] --> B[generate_agent_files]
    B --> C[generate_markdown_file_entries]
    B --> D[generate_llms_txt]
    B --> E[generate_llms_full_txt]

    D --> D1["LLMS_TXT_INTRO.format(llms_full_txt_url)\n# Reflex Documentation\n> blockquote\n## Docs"]
    D1 --> D2["### Section\n- [Title](url.md)\n..."]
    D2 --> D3["β†’ llms.txt"]

    E --> E1["LLMS_FULL_INTRO.format(...)"]
    E1 --> E2["Stitched Markdown pages"]
    E2 --> E3["β†’ llms-full.txt"]

    F[docpage template] --> G["sr-only blockquote\nhref=/llms.txt"]
    F --> H["Copy/LLM dropdown menu item\nhref=/llms-full.txt  target=_blank"]
Loading

Reviews (1): Last reviewed commit: "Fix docs llms index links" | Re-trigger Greptile

Comment thread docs/app/reflex_docs/templates/docpage/docpage.py
@Alek99 Alek99 merged commit 8f7ad9a into main Apr 28, 2026
69 checks passed
@Alek99 Alek99 deleted the codex/fix-llms-docs-index branch April 28, 2026 21:08
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.

2 participants