@rspress/core 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bb~0.js +1 -0
- package/dist/b~0.js +3026 -1
- package/dist/cli/index.js +1 -1
- package/dist/config/loadConfigFile.js +1 -1
- package/dist/eject-theme/components/HomeFeature/index.scss +12 -0
- package/dist/eject-theme/components/Sidebar/SidebarGroup.scss +14 -0
- package/dist/eject-theme/components/Sidebar/SidebarGroup.tsx +6 -1
- package/dist/eject-theme/components/Sidebar/SidebarItem.scss +0 -10
- package/dist/eject-theme/components/Sidebar/SidebarItem.tsx +2 -2
- package/dist/node/PluginDriver.js +1 -1
- package/dist/node/auto-nav-sidebar/index.js +1 -1
- package/dist/node/auto-nav-sidebar/locales.js +1 -1
- package/dist/node/auto-nav-sidebar/normalize.js +1 -1
- package/dist/node/auto-nav-sidebar/utils.js +1 -1
- package/dist/node/auto-nav-sidebar/walk.js +1 -1
- package/dist/node/eject.js +1 -1
- package/dist/node/initRsbuild.js +1 -1
- package/dist/node/mdx/options.js +1 -1
- package/dist/node/mdx/processor.js +1 -1
- package/dist/node/mdx/rehypePlugins/codeMeta.js +1 -1
- package/dist/node/mdx/rehypePlugins/headerAnchor.js +1 -1
- package/dist/node/mdx/rehypePlugins/shiki.js +1 -1
- package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
- package/dist/node/route/RoutePage.js +1 -1
- package/dist/node/route/RouteService.js +1 -1
- package/dist/node/route/extractPageData.js +1 -1
- package/dist/node/route/normalizeRoutePath.js +1 -1
- package/dist/node/runtimeModule/i18n/getI18nData.js +1 -1
- package/dist/node/runtimeModule/i18n/rsbuildPlugin.js +1 -1
- package/dist/node/runtimeModule/pageData/createPageData.js +1 -1
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -1
- package/dist/node/runtimeModule/searchHooks.js +1 -1
- package/dist/node/runtimeModule/siteData/createSiteData.js +1 -1
- package/dist/node/runtimeModule/siteData/normalizeThemeConfig.js +1 -1
- package/dist/node/runtimeModule/siteData/rsbuildPlugin.js +1 -1
- package/dist/node/serve.js +1 -1
- package/dist/node/sitemap.js +1 -1
- package/dist/node/ssg/alternateLinks.js +1 -1
- package/dist/node/ssg/renderPages.js +1 -1
- package/dist/node/ssg/rsbuildPluginSSG.js +1 -1
- package/dist/node/ssg/ssgEnv.js +1 -1
- package/dist/node/ssg-md/llms/emitLlmsTxt.js +1 -1
- package/dist/node/ssg-md/llms/llmsTxt.js +1 -1
- package/dist/node/ssg-md/remarkSplitMdx.d.ts +0 -4
- package/dist/node/ssg-md/remarkSplitMdx.js +266 -163
- package/dist/node/ssg-md/renderPage.js +1 -1
- package/dist/node/ssg-md/renderPages.js +1 -1
- package/dist/node/ssg-md/rsbuildPluginSSGMD.js +1 -1
- package/dist/node/utils/checkLanguageParity.js +1 -1
- package/dist/node/utils/createHash.js +1 -1
- package/dist/node/utils/flattenMdxContent.js +1 -1
- package/dist/node/utils/getPageKey.js +1 -1
- package/dist/node/utils/reactAlias.js +1 -1
- package/dist/{tx~0.js → q~0.js} +3 -3
- package/dist/shiki-transformers.js +1 -1
- package/dist/theme/components/HomeFeature/index.css +10 -0
- package/dist/theme/components/Sidebar/SidebarGroup.css +14 -0
- package/dist/theme/components/Sidebar/SidebarGroup.js +29 -22
- package/dist/theme/components/Sidebar/SidebarItem.css +0 -10
- package/dist/theme/components/Sidebar/SidebarItem.js +2 -2
- package/dist/y~0.js +1 -1
- package/package.json +10 -7
- package/skills/rspress-best-practices/SKILL.md +82 -0
- package/skills/rspress-custom-theme/SKILL.md +242 -0
- package/skills/rspress-custom-theme/references/css-variables.md +177 -0
- package/skills/rspress-custom-theme/references/eject-components.md +154 -0
- package/skills/rspress-custom-theme/references/layout-slots.md +153 -0
- package/skills/rspress-description-generator/SKILL.md +118 -0
- package/skills/rspress-docs-generator/SKILL.md +60 -0
- package/skills/rspress-docs-generator/references/create-new-docs.md +73 -0
- package/skills/rspress-docs-generator/references/doc-structure-conventions.md +117 -0
- package/skills/rspress-docs-generator/references/maintain-docs-for-prs.md +31 -0
- package/skills/rspress-docs-generator/references/rspress-version-guard.md +13 -0
- package/dist/8~0.js +0 -3033
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Maintain docs for PRs
|
|
2
|
+
|
|
3
|
+
Use this path when a Rspress v2 docs site already exists.
|
|
4
|
+
|
|
5
|
+
1. **Connect docs work to the change**
|
|
6
|
+
- If a PR already exists, read its title, description, linked issues, and the full PR diff.
|
|
7
|
+
- If no PR exists yet, inspect the current branch diff against the base branch using `git merge-base` and `git diff`.
|
|
8
|
+
- Identify user-facing changes: new APIs, config options, CLI flags, plugins, behavior changes, migration notes, deprecations, examples, or breaking changes.
|
|
9
|
+
- Use the PR title or conventional commit category as one signal, but also exercise independent judgment about whether the change affects users.
|
|
10
|
+
- If the change has no user-facing impact, report that no docs update is needed and explain why.
|
|
11
|
+
|
|
12
|
+
2. **Update the right pages**
|
|
13
|
+
- Modify existing pages before adding new pages when the change belongs in an established guide or API reference.
|
|
14
|
+
- Add new pages only for new workflows or concepts that need their own sidebar or top navigation entry.
|
|
15
|
+
- Keep examples minimal, runnable, and version-accurate.
|
|
16
|
+
- Add or update `description` frontmatter for every touched or created doc page.
|
|
17
|
+
- Update `_meta.json` whenever a new page should appear in the sidebar. Update the docs root `_nav.json` only when the page or section should appear in the top navigation. See [doc-structure-conventions.md](doc-structure-conventions.md) for examples.
|
|
18
|
+
- Use official Rspress docs to confirm syntax and conventions before adding new patterns:
|
|
19
|
+
- Frontmatter: <https://rspress.rs/guide/use-mdx/frontmatter>
|
|
20
|
+
- MDX and React components: <https://rspress.rs/guide/use-mdx/components>
|
|
21
|
+
- Links: <https://rspress.rs/guide/use-mdx/link>
|
|
22
|
+
- Autogenerated navigation: <https://rspress.rs/guide/basic/auto-nav-sidebar>
|
|
23
|
+
|
|
24
|
+
3. **Respect existing docs conventions**
|
|
25
|
+
- Match the site's language, tone, directory structure, i18n layout, frontmatter style, and MDX component patterns.
|
|
26
|
+
- For i18n sites, update all required locales or explicitly note which locale remains pending.
|
|
27
|
+
- Prefer first-class Rspress options and documented theme APIs over custom workarounds.
|
|
28
|
+
|
|
29
|
+
4. **Validate the documentation**
|
|
30
|
+
- Run the docs build from the Rspress project directory or through the repo's root script.
|
|
31
|
+
- If docs build is expensive or unavailable, at least validate changed Markdown/MDX structure, links, imports, navigation files, and frontmatter.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Rspress version guard
|
|
2
|
+
|
|
3
|
+
Use this path when a docs site exists but may depend on Rspress v1, or when a newly scaffolded docs site must be checked before content work. This skill should keep documentation work on Rspress v2 and avoid accidentally creating or maintaining a stale v1 project.
|
|
4
|
+
|
|
5
|
+
1. Check the docs project's dependencies and imports:
|
|
6
|
+
- Rspress v2 projects should depend on `@rspress/core` with a 2.x range.
|
|
7
|
+
- A `rspress` package dependency, `@rspress/core` 1.x, `@rspress/theme-default`, `@rspress/runtime`, or imports such as `rspress/runtime` and `rspress/theme` are v1 migration signals.
|
|
8
|
+
2. If the site is already on Rspress v2, continue with [Maintain Docs For PRs](maintain-docs-for-prs.md).
|
|
9
|
+
3. If v1 migration signals are present, do not perform the full migration in this skill. Report that the docs site must be upgraded first and use the dedicated `rspress-v2-upgrade` skill for the migration.
|
|
10
|
+
4. Keep the official migration guide as the fallback source of truth if the upgrade skill is unavailable or more detail is needed:
|
|
11
|
+
- Migration guide: <https://rspress.rs/guide/migration/rspress-1-x>
|
|
12
|
+
- Legacy Rspress 1.x docs: <https://v1.rspress.rs>
|
|
13
|
+
5. After the upgrade build passes, return to this skill for source-backed documentation updates.
|