Skip to content

feat(docs): mirror upstream docs tree directly (autosync)#385

Open
Ibrahim2595 wants to merge 1 commit into
llm-d:mainfrom
Ibrahim2595:feat/docs-autosync
Open

feat(docs): mirror upstream docs tree directly (autosync)#385
Ibrahim2595 wants to merge 1 commit into
llm-d:mainfrom
Ibrahim2595:feat/docs-autosync

Conversation

@Ibrahim2595

@Ibrahim2595 Ibrahim2595 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

This is the site half of the docs cleanup. It pairs with the upstream restructure in llm-d/llm-d#NNN, which reshaped that repo's docs/ folder so its layout matches the site one-to-one.

Until now, the sync script did a lot of reshaping: it flattened folders, remapped paths, and rewrote links to fit a structure that only existed here. That was ~1,000 lines of glue, and it broke any time an upstream page moved.

Now the site just mirrors the upstream docs/ tree as-is. The folder structure becomes the nav, _category_.json drives the sidebar, frontmatter handles ordering, and relative links resolve on their own. No remapping.

What changed

  • Rewrote sync-docs.sh to mirror upstream docs/ as-is. The old script was ~1,000 lines of copying, flattening, path remapping, and link rewriting. The new one just copies the tree over and applies our MDX tweaks (callouts, tabs, etc.). Relative links are left alone and resolve natively.

  • sidebars.ts is now auto-generated from the mirrored tree. Dropped the ~230-line hand-maintained sidebar. Section titles, order, and collapse state come from the upstream _category_.json files now.

  • Added redirects so old URLs keep working. Anything that moved in the new layout (the flattened well-lit-paths, resources/*, the API CRD pages, the /getting-started intro) redirects to its new home, so existing links and bookmarks don't 404.

  • Fixed "Edit this page" for the existing release docs. They get rebuilt with this config (by design), so the config rewrite had to keep handling their older layout, not just the new dev layout.

  • Pointed the "Dev" version links at the docs root. The dev intro now lives at /docs/dev/ instead of /docs/dev/getting-started, so the version dropdown (both the navbar and VersionDropdown.tsx) was updated to match.

  • Small build-all.sh tweak for the dev build. The new dev intro sits at the docs root, which collided with the old root-redirect page — so the dev build moves that redirect aside and restores it afterward. Release builds are unaffected.

Merge order

This one goes second. It reads the new structure that llm-d/llm-d#1933 adds upstream, so until that lands, the dev docs build here won't be green.

Merge llm-d/llm-d#1933 first, then this.

How was this tested?

  • Tests added/updated (npm test)
  • Site builds successfully (npm run build:all)
  • Check links after buildling (npm run check-links)
  • Manual testing performed (npm run serve)

Checklist

  • Commits are signed off (git commit -s) per DCO
  • Code follows project contributing guidelines
  • Tests pass locally (npm test)
  • Site builds without errors (npm run build:all)
  • No broken links after building full site (npm run check-links)
  • Documentation updated (if applicable)

Related Issues

#377

Rewrite the docs pipeline to build straight from llm-d/llm-d's docs/ tree
instead of remapping it. The upstream folder structure IS the site
structure, _category_.json drives the sidebar, and frontmatter controls
order/labels -- no path remapping, flattening, or slug injection.

- sync-docs.sh: mirror docs/ as-is, keeping relative Markdown links so
  Docusaurus resolves them natively (drops ~1000 lines of remapping)
- sidebars.ts: collapse to an autogenerated sidebar from the mirrored tree
- docusaurus.config.ts: add client redirects mapping the pre-autosync URLs
  (flattened well-lit-paths, resources/*, api-reference CRDs,
  /getting-started intro) to their new folder-mirrored locations
- build-all.sh: move src/pages/index.tsx aside for the dev build so the new
  root intro (slug: /) doesn't collide with the legacy root redirect
- VersionDropdown.tsx / docusaurus.config.js: point Dev links at the docs
  root now that the intro lives at /

Assumes the foundations restructure (llm-d#382) and the llm-d autosync PR land
first. Pairs with llm-d/llm-d feat/docs-autosync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: IBRAHIM IBRAHIM <66755652+Ibrahim2595@users.noreply.github.com>
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for llm-d ready!

Name Link
🔨 Latest commit e08da40
🔍 Latest deploy log https://app.netlify.com/projects/llm-d/deploys/6a4c37d9fcd29a978e6c4101
😎 Deploy Preview https://deploy-preview-385--llm-d.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant