docs: Split runtime hook docs into dedicated UI hook pages#2885
docs: Split runtime hook docs into dedicated UI hook pages#2885
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
Co-authored-by: SoonIter <79413249+SoonIter@users.noreply.github.com>
e86e826 to
86c28db
Compare
Rsdoctor Bundle Diff Analysis📁 webPath:
Generated by Rsdoctor GitHub Action |
There was a problem hiding this comment.
Pull request overview
This PR restructures the runtime hook documentation by splitting a monolithic API reference into dedicated, polished pages for each hook in both English and Chinese. The documentation is now organized under ui/hooks for improved discoverability.
- Split runtime hooks into individual documentation pages (
usePageData,useLang,useVersion,useDark, router hooks) - Updated all cross-references throughout the documentation to point to the new hook locations
- Removed the old
api/client-apidirectory structure and integrated hooks into the UI section
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
website/docs/{en,zh}/ui/hooks/use-version.mdx |
New dedicated page documenting the useVersion hook for multi-version documentation support |
website/docs/{en,zh}/ui/hooks/use-page-data.mdx |
New page for usePageData hook, marked as deprecated with enhanced usage examples |
website/docs/{en,zh}/ui/hooks/use-lang.mdx |
New page documenting useLang hook for locale management with live preview example |
website/docs/{en,zh}/ui/hooks/use-dark.mdx |
New page for useDark hook with SSG/hydration warnings and CSS selector guidance |
website/docs/{en,zh}/ui/hooks/router-hooks.mdx |
New page documenting re-exported React Router hooks |
website/docs/{en,zh}/ui/hooks/index.mdx |
Overview page for the hooks section |
website/docs/{en,zh}/ui/hooks/_meta.json |
Updated navigation metadata to include all new hook pages in proper order |
website/docs/{en,zh}/ui/custom-theme.mdx |
Updated Runtime API reference link to point to new hooks location |
website/docs/{en,zh}/ui/components/package-manager-tabs.mdx |
Added frontmatter with tag: ejectable and updated component imports |
website/docs/{en,zh}/plugin/system/introduction.mdx |
Updated usePageData reference to new documentation path |
website/docs/{en,zh}/plugin/official-plugins/algolia.mdx |
Updated Runtime API link to new hooks overview page |
website/docs/{en,zh}/api/client-api/api-runtime.mdx |
Removed old monolithic runtime API documentation |
website/docs/{en,zh}/api/client-api/api-components.mdx |
Removed old components API page |
website/docs/{en,zh}/api/client-api/_meta.json |
Removed client-api directory metadata |
website/docs/{en,zh}/api/_meta.json |
Removed client-api directory entry from API navigation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Runtime hook documentation was monolithic under
api-runtime; split and polished per-hook docs in both English and Chinese, now living underui/hooksfor easier discovery.usePageData,useLang,useVersion,useDark, and router hooks underwebsite/docs/*/ui/hooks._meta.jsonordering for new hook pages.api-runtimepages to an overview linking to the new hook docs.usePageDatadocs.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.