Skip to content

fix: collapse doubled section prefix in docs .md cross-links - #3005

Open
marekh19 wants to merge 3 commits into
masterfrom
fix/doubled-section-paths-md
Open

marekh19 wants to merge 3 commits into
masterfrom
fix/doubled-section-paths-md

Conversation

@marekh19

@marekh19 marekh19 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Part of apify/apify-web#6665

@signalwire/docusaurus-plugin-llms-txt@1.2.2 repeats the section prefix in the .md files and llms*.txt it generates for sites served under a sub-path, so roughly 6,700 links under /sdk/{js,python}, /api/client/{js,python} and /cli 404.

Two changes at our edge:

  • A 301 in nginx.conf collapsing the doubled prefix, so those links resolve in one hop. Verified against the real GitHub Pages origins: 1 redirect, 200, correct text/markdown.
  • The same substitution in joinLlmsFiles.mjs, so the root llms-full.txt is correct in its own text. Verified against the real production file: 6,664 doubled links to 0, nothing else touched. checkLlmsSize.mjs now fails the build if any come back.

The sources are fixed separately in apify/apify-cli#1455, apify/apify-sdk-js#737, apify/apify-sdk-python#1135, apify/apify-client-js#1072 and apify/apify-client-python#1070. Drop the joinLlmsFiles.mjs substitution once all five have deployed. Keep the redirect: the doubled URLs stay in search indexes and agent caches long after the sources are fixed.

It only collapses a repeated same-section prefix. The plugin also prefixes cross-section links (/sdk/js/cli/docs/...), 5 of them in the root llms-full.txt, which neither this nor the source fix addresses.

@marekh19 marekh19 added the t-web Issues with this label are in the ownership of the web team. label Sep 21, 2026
@apify-service-account

apify-service-account commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

✅ Preview for this PR (commit ebb80168) is ready at https://pr-3005.preview.docs.apify.com (see action run).

@marekh19
marekh19 force-pushed the fix/doubled-section-paths-md branch from d78ab62 to 26fc404 Compare September 21, 2026 12:06
@marekh19
marekh19 requested review from webrdaniel and removed request for marcel-rbro September 21, 2026 12:11
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Sep 21, 2026

@webrdaniel webrdaniel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice workaround

@marekh19
marekh19 requested a review from B4nan September 22, 2026 11:27

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

t-web Issues with this label are in the ownership of the web team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants