Skip to content

[docs] Docs restructure #30091

@siriwatknp

Description

@siriwatknp

From the decision in the Notion, the documentation will be restructured into each product.

Goal

Incrementally and smoothly transition to the new structure by preserving the same DX for the community and maintainers (tests should be added along the way).

The new repo structure:
image

Improvements are not the focus of this initiative. However, they can be listed in this issue and prioritized later.

Plan

To achieve a smooth transition, the work is split into 3 phases.

1. Preparation

Prepare E2E tests, migration tool, update scripts and add UI (each PR should be able to merge without affecting the production code, either set as feature flag or exclude from production build).

2.1 Migrate content

At this phase, the new URLs have to be deployed to production so that algolia can crawl and index. However, before algolia finish the indexing I think we should preserve the old URLs (meaning, people still browsing old URLs and won't realize that we are migrating the content).

What'd happen after running the scripts

  • data (demos, markdowns) will be moved from docs/src/pages/* to docs/data/*. (Both the old & new URLs are using the same demos, markdowns from the new location so we are always using the single source of truth)
  • feature toggle enable_product_scope: true is turned on. This enables several things such as E2E tests for the new URLs, buildApi script, and query markdowns from the new location.
  • product identifier & navigation are rendered on new locations but not on old URLs
  • All of the links for existing pages remain the same, which means users won’t realize that the duplicated contents exist. (But they can accidentally access via direct URL).
  • yarn docs:api will generate API pages for both previous & new URLs

image

3. New product spaces

Est. mid of Mar.

4. Go live

Est. 4th April 2022.

5. Clean up

  • remove material-redirects.spec e2e after redirects period
  • delete old pages inside docs/pages/...`
  • `remove material-old e2e test
  • remove replaceHtmlLinks, replaceUrlLinks
  • remove migration script
  • remove old config in buildApi.ts
  • use new logic in parseMarkdown.js for the API section

cc @mui-org/core @mui-org/x

Metadata

Metadata

Assignees

Labels

designThis is about UI or UX design, please involve a designer.docsImprovements or additions to the documentation.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions