-
Notifications
You must be signed in to change notification settings - Fork 44
feat(rspress): upgrade Rspress examples to v2 #438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
24a997b
9b0c14a
f907efd
9e0ea1e
f607d4d
5b3456e
fa42137
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Rspress website | ||
|
|
||
| ## Setup | ||
|
|
||
| Install the dependencies: | ||
|
|
||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| ## Get started | ||
|
|
||
| Start the dev server: | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| Build the website for production: | ||
|
|
||
| ```bash | ||
| npm run build | ||
| ``` | ||
|
|
||
| Preview the production build locally: | ||
|
|
||
| ```bash | ||
| npm run preview | ||
| ``` | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| [ | ||
| { | ||
| "text": "Guide", | ||
| "link": "/guide/start/introduction", | ||
| "activeMatch": "/guide/" | ||
| }, | ||
| { | ||
| "text": "API", | ||
| "link": "/api/", | ||
| "activeMatch": "/api/" | ||
| }, | ||
| { | ||
| "text": "Document", | ||
| "link": "https://rspress.rs/" | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ["index", "commands"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Commands | ||
|
|
||
| ## dev | ||
|
|
||
| ## build | ||
|
|
||
| ## preview |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| title: API Overview | ||
| overview: true | ||
| --- | ||
|
|
||
| This is an API Overview page which outlines all the available APIs. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,12 @@ | ||
| ["index"] | ||
| [ | ||
| { | ||
| "type": "dir-section-header", | ||
| "name": "start", | ||
| "label": "Getting Started" | ||
| }, | ||
| { | ||
| "type": "dir-section-header", | ||
| "name": "use-mdx", | ||
| "label": "Markdown & MDX" | ||
| } | ||
| ] |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ["introduction", "getting-started"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Getting started | ||
|
|
||
| ## Project structure | ||
|
|
||
| After creating a project with `create-rspress`, you will get the following project structure: | ||
|
|
||
| - `docs/` — The documentation source directory, configured via `root` in `rspress.config.ts`. | ||
| - `docs/_nav.json` — The navigation bar configuration. | ||
| - `docs/guide/_meta.json` — The sidebar configuration for the guide section. | ||
| - `docs/public/` — Static assets directory. | ||
| - `theme/` — Optional custom theme directory, generated when you choose the custom theme scaffold. | ||
| - `rspress.config.ts` — The Rspress configuration file. | ||
|
|
||
| ## Development | ||
|
|
||
| Start the local development server: | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| :::tip | ||
|
|
||
| You can specify the port number or host with `--port` or `--host`, such as `rspress dev --port 8080 --host 0.0.0.0`. | ||
|
|
||
| ::: | ||
|
|
||
| ## Production build | ||
|
|
||
| Build the site for production: | ||
|
|
||
| ```bash | ||
| npm run build | ||
| ``` | ||
|
|
||
| By default, Rspress will output to `doc_build` directory. | ||
|
|
||
|
Comment on lines
+34
to
+37
|
||
| ## Preview | ||
|
|
||
| Preview the production build locally: | ||
|
|
||
| ```bash | ||
| npm run preview | ||
| ``` | ||
|
|
||
| ## Next steps | ||
|
|
||
| - Learn how to use [MDX & React Components](/guide/use-mdx/components) in your docs. | ||
| - Learn about [Code Blocks](/guide/use-mdx/code-blocks/) syntax highlighting and line highlighting. | ||
| - Learn about [Custom Containers](/guide/use-mdx/container) for tips, warnings, and more. | ||
| - Explore the full [Rspress documentation](https://rspress.rs/) for advanced features. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This README instructs
npm install, but this repo is a pnpm workspace (root scripts usepnpm --filter ...). Using npm here can create an extra lockfile and different resolution; update the instructions to use pnpm (e.g.pnpm installat repo root andpnpm --filter @rspress-example/basic dev/pnpm dev).