chore: fix some problems with docs site#9928
Merged
Merged
Conversation
gonfunko
approved these changes
May 22, 2026
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.
The basics
The details
Resolves
Fixes 2 problems with docs site:
the reference docs are broken because api-extractor lets namespaces and classes with the same name clobber each other. we previously had a patch that fixed this problem so i need to investigate if the patch isn't working or if it was accidentally removed.
there's also a problem with the index pages. any page called index.md works for client side navigation but not for server side rendering. if you click on the "contribute to blockly" section of the guides, it loads. but when you refresh, you get a 404. i think this is related to the fact that they're index.md files and somewhere we have that configured to resolve to the path without that in the name
Proposed Changes
Probably easiest to review this change commit-wise:
patch-packageis run at the correct point in the lifecycletrailingSlashes: truewhich is the recommended configuration for deploying on Cloudflare Pages because that host always tries to add one if there's not an extension specified. you can see this in action even before this change because if you navigate to page on docs.blockly.com, the page won't have the trailing slash but if you refresh, it will. this is because cf is adding the slash but docusaurus isn't generating the files with one. this update always adds the trailing slash so that when you refresh, the url does not change.index.mdxfiles because they were incorrect, just relying on the automatically generated ones results in the correct behavior. manually addingindexto the slug was throwing off the url and causing the second problem above. also updated relevant links to these files..mdand some didn't. also adds the trailing slash.Reason for Changes
see above
Test Coverage
Tested locally in production mode (
npm run buildandnpm run serve).Manually verified:
Unable to verify:
Documentation
Additional Information