Skip to content

docs: replace localhost links in .md copies with production URLs - #7581

Draft
Alek99 wants to merge 2 commits into
mainfrom
cursor/fix-docs-md-localhost-links-526f
Draft

Alek99 wants to merge 2 commits into
mainfrom
cursor/fix-docs-md-localhost-links-526f

Conversation

@Alek99

@Alek99 Alek99 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Description

This PR fixes RB-047 by replacing broken localhost:3000 links in markdown documentation files (.md copies) with production URLs.

Problem: Documentation pages served as .md files (e.g., https://reflex.dev/docs/getting-started/introduction.md) contained broken localhost:3000 links in their banners. These links were broken for external readers like AI agents, search engine crawlers, and ChatGPT, negatively impacting SEO and AEO (AI Engine Optimization).

Example of the broken banner:

> For AI agents: the complete documentation index is at [llms.txt](https://reflex.dev/docs/llms.txt). 
For a Markdown version, remove the trailing slash from the page URL and append `.md`. 
The docs home is available at [index.md](http://localhost:3000/docs/index.md).

Solution: Changed the markdown directive banner to use hardcoded production URLs (https://reflex.dev/docs/index.md) instead of config-dependent localhost URLs. This is consistent with how PUBLIC_LLMS_TXT_URL is already handled.

Changes:

  • Added PUBLIC_DOCS_HOME_MARKDOWN_URL constant pointing to production URL
  • Updated _markdown_directive() to use the new constant instead of public_url("/index.md")
  • Updated test expectations to match the production URL
  • Added news fragment for changelog

Impact

This is a template-level one-line fix that applies to all generated .md documentation files. No individual doc pages were modified.

Testing

  • Updated test passes successfully
  • Linting passes (ruff check and ruff format)
  • Verified no remaining localhost:3000 references in docs generation code
  • News fragment added

References

Fixes RB-047

Open in Web Open in Cursor 

View guided diff Turn on auto-fix

cursoragent and others added 2 commits October 16, 2026 15:08
Fix RB-047: Docs pages served as .md files (e.g., /docs/getting-started/introduction.md)
contained broken localhost:3000 links in their banners, which are broken for external
readers like AI agents, crawlers, and ChatGPT.

Changed the markdown directive banner to use hardcoded production URLs
(https://reflex.dev/docs/index.md) instead of config-dependent localhost URLs.

This ensures AI agents and search engines accessing the .md files see working links
to the documentation home and index.

Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>
Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Changes the Markdown banner’s docs-home link to https://reflex.dev/docs/index.md.

  • Markdown banners link to the public docs index in every build.

Reviews (1) · Last reviewed commit: "Add news fragment for RB-047 fix" · Reviewed by Greptile

@codspeed

codspeed Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 20 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 148 untouched benchmarks


Comparing cursor/fix-docs-md-localhost-links-526f (d572d8f) with main (f10cff4)

Open in CodSpeed

This branch has not been deployed

No deployments
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