Wrap @theme-original/Root so the markdown plugin keeps its injection - #2713
Merged
kaankacar merged 1 commit intoJul 30, 2026
Conversation
docusaurus-markdown-source-plugin ships its own theme Root, which is what injects the Open Markdown dropdown and the hash-scroll behavior. The user-land Root added in #2698 shadowed it outright, removing the button site-wide. Wrapping the original Root keeps the plugin running and still mounts the For agents panel once above the router. Fixes #2712
|
Preview is available here: |
ElliotFriend
approved these changes
Jul 30, 2026
kaankacar
deleted the
2712-regression-open-markdown-button-missing-on-all-docs-pages-since-2698
branch
July 30, 2026 13:53
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.
Closes #2712.
Root cause
docusaurus-markdown-source-pluginprovides its owntheme/Root.js, which injects the "Open Markdown" dropdown into the article header and smooth-scrolls to URL hashes. The user-landsrc/theme/Root.tsxadded in #2698 (cc @oceans404) shadows the plugin's Root completely, so its injection never ran and the button disappeared from every docs page in production. Evidence and build-by-build comparison in #2712.Fix
One-file change:
src/theme/Root.tsxnow wraps@theme-original/Rootinstead of replacing it, following the same wrapper pattern the repo already uses forDocItem/Footer,DocCardList, andApiExplorer. The plugin's Root keeps running and the "For agents" panel still mounts once above the router.Verification
Full
pnpm buildpasses with the change. Served the build and checked in a real browser:/docs/build/building-with-ai: exactly one.markdown-actions-container(the button is back) and exactly one "For agents" trigger, no console or page errors.#stellar-skills) scrolls to the section, confirming the plugin Root's scroll handling is active again.