Skip to content

feat(website): preserve nextra style with rspress-custom-theme skill#322

Merged
kdy1 merged 3 commits into
swc-project:rspressfrom
SoonIter:feat/polish-rspress-site
Jul 10, 2026
Merged

feat(website): preserve nextra style with rspress-custom-theme skill#322
kdy1 merged 3 commits into
swc-project:rspressfrom
SoonIter:feat/polish-rspress-site

Conversation

@SoonIter

@SoonIter SoonIter commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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, and add a fully redesigned homepage.
  3. Enable llms: true to generate LLM-friendly site outputs.
  4. Replace package-manager installation snippets with PackageManagerTabs.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plugins Ready Ready Preview, Comment Jul 10, 2026 9:04am
website Ready Ready Preview, Comment Jul 10, 2026 9:04am

Request Review

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@SoonIter is attempting to deploy a commit to the SWC Project Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Jul 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@kdy1

kdy1 commented Jul 10, 2026

Copy link
Copy Markdown
Member

I changed the base branch to the rspress branch, which contains the rspress docs site

SoonIter commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author
Page Nextra Before After — Rspress version in this PR
Home Home — current Nextra site Home before Home after
Docs Docs — current Nextra site Docs before Docs after
Playground Playground — current Nextra site Playground before Playground after

The Rspress implementation aims to keep the design as close as possible to the current Nextra-based swc.rs site with the rspress-custom-theme skill, while adding a purpose-built homepage and restoring the Playground's full-width layout.

@SoonIter SoonIter marked this pull request as ready for review July 10, 2026 08:13
Copilot AI review requested due to automatic review settings July 10, 2026 08:13
@kdy1

kdy1 commented Jul 10, 2026

Copy link
Copy Markdown
Member

I think UI should be changed a lot to match the current https://swc.rs

I reverted #321 because it changed the style, and I'll merge the rspress branch to the main repository when UI change is reverted

Considering that, I'm not sure if the homepage improvement of the rspress branch is a good idea

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 HomeLayout and substantial styling overrides.
  • Enable llms: true and introduce an SSG_MD path for generating markdown-like homepage output.
  • Replace ad-hoc package-manager install tabs/snippets with PackageManagerTabs, and update the Playground page to pageType: 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.

Comment thread apps/website/theme/components/HomeLayout/useNavTransparent.tsx Outdated
Comment thread apps/website/theme/components/HomeLayout/useNavTransparent.tsx Outdated
@Nsttt

Nsttt commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

nvm, we can probably merge this one, i'll open another one

@kdy1

kdy1 commented Jul 10, 2026

Copy link
Copy Markdown
Member

I think other changes except the main page are good to merge. Can you rebase?

Copy link
Copy Markdown
Contributor Author

Thanks! I’ll rebase, revert the changes related to the new homepage, and keep the styling changes that align with the Nextra theme.

@SoonIter SoonIter changed the title feat(website): polish the Rspress site experience feat(website): preserve nextra style with rspress-custom-theme skill Jul 10, 2026
SoonIter added 2 commits July 10, 2026 16:47
- fix the Playground custom page layout\n- replace install snippets with PackageManagerTabs\n- align the custom theme with the original Nextra site

@kdy1 kdy1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry to ask, but can you

@kdy1 kdy1 merged commit 18e8cb2 into swc-project:rspress Jul 10, 2026
5 of 6 checks passed
@SoonIter

Copy link
Copy Markdown
Contributor Author

@kdy1 I'm sorry to ask, but can you

it looks like your comment got cut off. no worries, just let me know if there’s anything else with the docs

@kdy1

kdy1 commented Jul 10, 2026

Copy link
Copy Markdown
Member

Sorry, I was originally trying to ask you if you can restore the UI. I wrote it before reverting the original rspress PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

kdy1 pushed a commit that referenced this pull request Jul 10, 2026
…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).
@SoonIter SoonIter deleted the feat/polish-rspress-site branch July 13, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants