The PageTabs component creates sub-tabs within a page, allowing a single page to be split into multiple sub-pages. Each page may contain exactly one PageTabs.
It's recommended to use MDX fragments to split a page into multiple sub-pages.
Based on extensive feedback from V1 users, we found that users often encountered issues with incorrect static TOC extraction when using MDX fragments that include headers.
Rspress V2 introduces Dynamic TOC, which dynamically generates the TOC at runtime by monitoring DOM changes through MutationObserver. This ensures TOC accuracy and allows users to leverage the full flexibility of MDX fragments. This also makes the <PageTabs /> component possible.