feat(website): preserve nextra style with rspress-custom-theme skill#322
Conversation
|
@SoonIter is attempting to deploy a commit to the SWC Project Team on Vercel. A member of the Team first needs to authorize it. |
|
I changed the base branch to the |
The Rspress implementation aims to keep the design as close as possible to the current Nextra-based swc.rs site with the |
|
I think UI should be changed a lot to match the current I reverted #321 because it changed the style, and I'll merge the Considering that, I'm not sure if the homepage improvement of the |
There was a problem hiding this comment.
Pull request overview
This PR polishes the SWC Rspress migration by introducing a custom theme and redesigned homepage experience, fixing the Playground page type, enabling LLM-friendly outputs, and standardizing install snippets across the docs.
Changes:
- Add an Rspress custom theme that wires in a custom
HomeLayoutand substantial styling overrides. - Enable
llms: trueand introduce anSSG_MDpath for generating markdown-like homepage output. - Replace ad-hoc package-manager install tabs/snippets with
PackageManagerTabs, and update the Playground page topageType: custom.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/website/tsconfig.json | Include theme/ and env.d.ts in TS compilation for the custom theme + env typing. |
| apps/website/theme/index.tsx | Inject custom HomeLayout into the original Rspress layout and re-export it. |
| apps/website/theme/index.css | Large theme refresh: palette, typography, header/sidebar/doc styling, tabs/code blocks, responsive tweaks. |
| apps/website/theme/components/HomeLayout/useNavTransparent.tsx | Add scroll-based nav transparency behavior for the homepage. |
| apps/website/theme/components/HomeLayout/index.tsx | Implement redesigned homepage layout and an SSG/LLM markdown-ish rendering path. |
| apps/website/theme/components/HomeLayout/index.css | Add homepage-specific styling (hero/features layout + responsive behavior). |
| apps/website/src/styles/index.css | Adjust codeblock title background inside .swc-callout. |
| apps/website/rspress.config.ts | Enable llms: true in site config. |
| apps/website/env.d.ts | Add typing for import.meta.env.SSG_MD and CSS module declarations. |
| apps/website/docs/playground/index.mdx | Switch Playground to pageType: custom. |
| apps/website/docs/index.mdx | Remove hero/features frontmatter content, leaving homepage driven by the custom theme layout. |
| apps/website/docs/docs/usage/swc-loader.mdx | Replace install tabs with PackageManagerTabs. |
| apps/website/docs/docs/usage/jest.mdx | Replace install tabs with PackageManagerTabs. |
| apps/website/docs/docs/usage/html.mdx | Replace install tabs with PackageManagerTabs. |
| apps/website/docs/docs/usage/cli.mdx | Replace install snippets/tabs with PackageManagerTabs (including chokidar). |
| apps/website/docs/docs/usage/bundling.mdx | Replace install tabs with PackageManagerTabs. |
| apps/website/docs/docs/references/wasm-typescript.mdx | Replace install snippet with PackageManagerTabs. |
| apps/website/docs/docs/getting-started.mdx | Replace install tabs with PackageManagerTabs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
nvm, we can probably merge this one, i'll open another one |
|
I think other changes except the main page are good to merge. Can you rebase? |
|
Thanks! I’ll rebase, revert the changes related to the new homepage, and keep the styling changes that align with the Nextra theme. |
- fix the Playground custom page layout\n- replace install snippets with PackageManagerTabs\n- align the custom theme with the original Nextra site
4df7281 to
0b8394b
Compare
0b8394b to
03ca754
Compare
it looks like your comment got cut off. no worries, just let me know if there’s anything else with the docs |
|
Sorry, I was originally trying to ask you if you can restore the UI. I wrote it before reverting the original rspress PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03ca7545f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ``` | ||
| </Tab> | ||
| </Tabs> | ||
| <PackageManagerTabs command="install -D @swc/cli @swc/core" /> |
There was a problem hiding this comment.
Avoid generating a Deno install tab for the CLI
When command is a string, PackageManagerTabs renders the default npm/yarn/pnpm/bun/deno tabs. On this install block that adds a Deno command for @swc/cli, but the workflow immediately tells users to run the Node executable with npx swc; deno add does not provide that CLI path, so Deno users get a dead-end install option that was not present in the previous pnpm/npm/yarn-only tabs. Use an explicit command object, as the homepage already does, or otherwise omit unsupported managers.
Useful? React with 👍 / 👎.
…322) ## Summary Polish the Rspress migration while preserving key website behavior and improving the documentation experience. ## Changes 1. Fix the Playground route by using the correct custom `pageType`. 2. Migrate the current Nextra-based swc.rs design to a custom Rspress theme, keeping the visual style as close as possible with the [`rspress-custom-theme` skill](https://github.com/rstackjs/agent-skills/blob/main/skills/rspress-custom-theme/SKILL.md), and add a fully redesigned homepage. 3. Enable `llms: true` to generate LLM-friendly site outputs. 4. Replace package-manager installation snippets with [`PackageManagerTabs`](https://rspress.rs/api/client-api/api-components/package-manager-tabs).









Summary
Polish the Rspress migration while preserving key website behavior and improving the documentation experience.
Changes
pageType.rspress-custom-themeskill, and add a fully redesigned homepage.llms: trueto generate LLM-friendly site outputs.PackageManagerTabs.