docs: stop repeating the section prefix in generated Markdown links - #1455
Merged
Merged
Conversation
marekh19
marked this pull request as ready for review
September 22, 2026 06:46
marekh19
marked this pull request as draft
September 22, 2026 07:37
webrdaniel
approved these changes
Sep 22, 2026
marekh19
marked this pull request as ready for review
September 22, 2026 07:40
marekh19
marked this pull request as draft
September 22, 2026 07:52
marekh19
marked this pull request as ready for review
September 22, 2026 07:53
marekh19
marked this pull request as draft
September 22, 2026 09:22
B4nan
approved these changes
Sep 22, 2026
marekh19
marked this pull request as ready for review
September 22, 2026 11:27
…in-generated-md-links # Conflicts: # pnpm-lock.yaml
marekh19
added a commit
to apify/apify-docs
that referenced
this pull request
Sep 24, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of apify/apify-web#6665
@signalwire/docusaurus-plugin-llms-txt@1.2.2prepends the site URL to link paths that already carry the DocusaurusbaseUrl, so the generated Markdown points athttps://docs.apify.com/cli/cli/docs/..., which 404s. It only happens on sites served under a sub-path.The fix is already upstream in
2.0.0-alpha.6, but it does not look like it will be published soon: npmlatestis still 1.2.2 and nothing has shipped since2.0.0-alpha.7in November 2025. This patch applies that same fix locally. Remove it once a stable 2.x lands.Built here:
llms-full.txtgoes from 21 doubled links to 0,llms.txtstays at 11 correct links.The same patch goes into
apify-sdk-js,apify-sdk-python,apify-client-jsandapify-client-python.