Repository navigation
feat(site): add Copy page and Open in buttons; inline partials in Markdown sources - #1982
Conversation
…kdown sources Publish rendered Markdown at /md-source/: inline _partials imports, replace doc variables, and keep frontmatter so the description stays. Add Copy page and an Open in menu (ChatGPT, Claude, Gemini, Perplexity) next to the Page/Markdown tabs. Keep each view tied to its page so following a link starts on the Page tab. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Code ReviewI found no blocking issues. The build pipeline, routing, and dev-server changes look correct. I checked these against
Some smaller issues worth considering:
The workflows, secrets, |
|
Glad to see our plug-in was of use to you. We're open to any suggestions and feedback. |
Summary
Follow-up to #1934. Evaluated the FlyNumber
docusaurus-markdown-source-pluginand kept our/md-source/implementation, adding the parts of that plugin worth having.import X from '…/_partials/x.mdx'with a bare<X />is replaced by the partial's text, nested partials included, with a depth limit and a self-import guard. Code fences are left alone. Today that is 33 imports across Identity Manager pages.{{Token}}pages).description,keywordsandtitlestay at the top of each file. Partial frontmatter is dropped.CLAUDE.md,_partials, drafts) return 404.Addresses both non-blocking notes from the review on #1934.
Notes
setupMiddlewaresreplaces Docusaurus's own dev-server middleware list, so the plugin re-adds its source-map middleware through an internal path (@docusaurus/core/lib/commands/utils/legacy/evalSourceMapMiddleware). If a Docusaurus upgrade moves it, the load falls back to skipping it; only the error overlay's source lookup is affected.src/training/*components (94 files) are not resolved. Their text lives in JS, not Markdown.Test plan
node --testfor the renderer (partials, nesting, fences, loops, missing files, variables), the provider links, the helper, robots, llms.txt, blob metadata and SEO (137 pass)importlines, traversal andCLAUDE.mdreturn 404DOCS_PRODUCT=identitymanagerbuild: partial inlined and description kept inbuild/md-source/…, buttons render, no empty directories/md-source/file🤖 Generated with Claude Code