diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 80145794e..df814a23d 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,6 +1,6 @@ -# Contributor Covenant Code of Conduct +# Contributor covenant code of conduct -## Our Pledge +## Our pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body @@ -12,7 +12,7 @@ and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. -## Our Standards +## Our standards Examples of behavior that contributes to a positive environment for our community include: @@ -36,7 +36,7 @@ Examples of unacceptable behavior include: - Other conduct which could reasonably be considered inappropriate in a professional setting -## Enforcement Responsibilities +## Enforcement responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in @@ -65,7 +65,7 @@ All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. -## Enforcement Guidelines +## Enforcement guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: @@ -91,7 +91,7 @@ includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. -### 3. Temporary Ban +### 3. Temporary ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. @@ -102,7 +102,7 @@ private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. -### 4. Permanent Ban +### 4. Permanent ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 012d35eb7..8ccdff31f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,12 @@ -# Contributing Guide +# Contributing guide Thanks for that you are interested in contributing to Rspress. Before starting your contribution, please take a moment to read the following guidelines. --- -## Setup the Dev Environment +## Setup the dev environment -### Fork the Repo +### Fork the repo [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local. @@ -41,7 +41,7 @@ nvm use 18 corepack enable ``` -### Install Dependencies +### Install dependencies ```sh pnpm install @@ -53,7 +53,7 @@ What this will do: - Create symlinks between packages in the monorepo - Run the `build` script to build all packages (this will take some time, but is necessary to make ensure all packages are built) -### Set Git Email +### Set git email Please make sure you have your email set up in ``. This will be needed later when you want to submit a pull request. @@ -77,11 +77,11 @@ git config user.email "SOME_EMAIL@example.com" --- -## Making Changes and Building +## Making changes and building Once you have set up the local development environment in your forked repo, we can start development. -### Checkout A New Branch +### Checkout a new branch It is recommended to develop on a new branch, as it will make things easier later when you submit a pull request: @@ -89,7 +89,7 @@ It is recommended to develop on a new branch, as it will make things easier late git checkout -b MY_BRANCH_NAME ``` -### Build the Package +### Build the package To build the package you want to change, first open the package directory, then run the `build` command: @@ -117,7 +117,7 @@ If you need to clean all `node_modules/*` in the project, run the `reset` comman pnpm run reset ``` -### Debug Code +### Debug code After `build`, we need to link this repo to the global, run the link command: @@ -143,7 +143,7 @@ pnpm run dev ## Testing -### Run Unit Tests +### Run unit tests Before submitting a pull request, it's important to make sure that the changes haven't introduced any regressions or bugs. You can run the unit tests for the project by executing the following command: @@ -157,7 +157,7 @@ Alternatively, you can run the unit tests of single package using the `--filter` pnpm run --filter rspress test ``` -### Run E2E Tests +### Run E2E tests In addition to the unit tests, the Rspress also includes end-to-end (E2E) tests, which checks the functionality of the application as a whole. @@ -181,9 +181,9 @@ pnpm run lint --- -## Submitting Changes +## Submitting changes -### Committing your Changes +### Committing your changes Commit your changes to your forked repo, and [create a pull request](https://help.github.com/articles/creating-a-pull-request/). diff --git a/README.md b/README.md index ff8d7920b..42e7c10d0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ A fast Rspack-based static site generator. - **🔌 Providing Plugin System**: Providing a plugin system, you can customize the build process and theme according to your needs. - **📝 Component Document**: Support multi ways to preview your component demo. -## 📚 Getting Started +## 📚 Getting started Go to the [Quick Start](https://rspress.dev/guide/start/getting-started.html) to get started. @@ -79,7 +79,7 @@ If you have any questions, you can open an issue or go to [Discord](https://disc -### Code of Conduct +### Code of conduct This repo has adopted the ByteDance Open Source Code of Conduct. Please check [Code of Conduct](./CODE_OF_CONDUCT.md) for more details. diff --git a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-in-meta/index.md b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-in-meta/index.md index df1140069..1de7d8f5c 100644 --- a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-in-meta/index.md +++ b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-in-meta/index.md @@ -2,4 +2,4 @@ context: 'context-index-in-meta' --- -# Index In Meta +# Index in meta diff --git a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-md-convention/index.md b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-md-convention/index.md index 2871b2e00..8692dd6df 100644 --- a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-md-convention/index.md +++ b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-md-convention/index.md @@ -2,4 +2,4 @@ context: 'context-index-md-convention' --- -# Index Md Convention +# Index md convention diff --git a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-mdx-convention/index.mdx b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-mdx-convention/index.mdx index 3e67f5f55..541aae84f 100644 --- a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-mdx-convention/index.mdx +++ b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/index-mdx-convention/index.mdx @@ -2,4 +2,4 @@ context: 'context-index-mdx-convention' --- -# Index Mdx Convention +# Index MDX convention diff --git a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/no-meta-md/index.md b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/no-meta-md/index.md index 90cfb98c5..0e3cdf57a 100644 --- a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/no-meta-md/index.md +++ b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/no-meta-md/index.md @@ -2,4 +2,4 @@ context: 'context-no-meta-md' --- -# No Meta Md +# No meta md diff --git a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/no-meta-mdx/index.mdx b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/no-meta-mdx/index.mdx index 91292ebaf..980093c1f 100644 --- a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/no-meta-mdx/index.mdx +++ b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/no-meta-mdx/index.mdx @@ -2,4 +2,4 @@ context: 'context-no-meta-mdx' --- -# No Meta Mdx +# No meta MDX diff --git a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/same-name.mdx b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/same-name.mdx index 0f2405d3c..d147eb420 100644 --- a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/same-name.mdx +++ b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/guide/same-name.mdx @@ -2,4 +2,4 @@ context: 'context-same-name' --- -# Same Name Outer Page +# Same name outer page diff --git a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/index.md b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/index.md index 29658341f..716ed1421 100644 --- a/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/index.md +++ b/e2e/fixtures/auto-nav-sidebar-dir-convention/doc/index.md @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-a.mdx b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-a.mdx index d42ef91df..b5b5626c9 100644 --- a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-a.mdx +++ b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-a.mdx @@ -1,3 +1,3 @@ -# Plugin A +# Plugin a this directory has no meta and no index.mdx, should use directory name diff --git a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-b.mdx b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-b.mdx index 05fa99093..951f7a658 100644 --- a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-b.mdx +++ b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-b.mdx @@ -1 +1 @@ -# Plugin B +# Plugin b diff --git a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-basic.mdx b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-basic.mdx index ac39e2ba1..38baa418f 100644 --- a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-basic.mdx +++ b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-basic.mdx @@ -1,4 +1,4 @@ -# Basic Config +# Basic config ## root diff --git a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-build.mdx b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-build.mdx index 5f6ffa103..6247e181d 100644 --- a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-build.mdx +++ b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-build.mdx @@ -1,8 +1,8 @@ -# Build Config +# Build config ## builderConfig -### Default Config +### Default config ## markdown diff --git a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-frontmatter.mdx b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-frontmatter.mdx index 4cac3ed15..43a720443 100644 --- a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-frontmatter.mdx +++ b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-frontmatter.mdx @@ -2,7 +2,7 @@ overviewHeaders: [] --- -# Front Matter Config +# Front matter config ## title diff --git a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-theme.mdx b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-theme.mdx index f99473c33..75145bfd2 100644 --- a/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-theme.mdx +++ b/e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/rspress-config/config-theme.mdx @@ -1,4 +1,4 @@ -# Theme Config +# Theme config ## nav diff --git a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-basic.mdx b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-basic.mdx index ac39e2ba1..38baa418f 100644 --- a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-basic.mdx +++ b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-basic.mdx @@ -1,4 +1,4 @@ -# Basic Config +# Basic config ## root diff --git a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-build.mdx b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-build.mdx index 5f6ffa103..6247e181d 100644 --- a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-build.mdx +++ b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-build.mdx @@ -1,8 +1,8 @@ -# Build Config +# Build config ## builderConfig -### Default Config +### Default config ## markdown diff --git a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-extname.json.mdx b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-extname.json.mdx index cdb36b2d0..f4f93f990 100644 --- a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-extname.json.mdx +++ b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-extname.json.mdx @@ -1 +1 @@ -# Extname Config +# Extname config diff --git a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-frontmatter.mdx b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-frontmatter.mdx index 8b7bf08dc..5c8d4885f 100644 --- a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-frontmatter.mdx +++ b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-frontmatter.mdx @@ -3,7 +3,7 @@ overviewHeaders: [] context: 'front-matter' --- -# Front Matter Config +# Front matter config ## title diff --git a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-theme.mdx b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-theme.mdx index f99473c33..75145bfd2 100644 --- a/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-theme.mdx +++ b/e2e/fixtures/auto-nav-sidebar/doc/api/config/config-theme.mdx @@ -1,4 +1,4 @@ -# Theme Config +# Theme config ## nav diff --git a/e2e/fixtures/auto-nav-sidebar/doc/api/config/nested/config-nested.mdx b/e2e/fixtures/auto-nav-sidebar/doc/api/config/nested/config-nested.mdx index 319ba478e..932334630 100644 --- a/e2e/fixtures/auto-nav-sidebar/doc/api/config/nested/config-nested.mdx +++ b/e2e/fixtures/auto-nav-sidebar/doc/api/config/nested/config-nested.mdx @@ -1,3 +1,3 @@ -# Nested Config +# Nested config ## Nested H2 diff --git a/e2e/fixtures/auto-nav-sidebar/doc/index.md b/e2e/fixtures/auto-nav-sidebar/doc/index.md index 29658341f..716ed1421 100644 --- a/e2e/fixtures/auto-nav-sidebar/doc/index.md +++ b/e2e/fixtures/auto-nav-sidebar/doc/index.md @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/basic/doc/index.mdx b/e2e/fixtures/basic/doc/index.mdx index 304a2ffa1..65bf7a5fb 100644 --- a/e2e/fixtures/basic/doc/index.mdx +++ b/e2e/fixtures/basic/doc/index.mdx @@ -1,4 +1,4 @@ -# Hello World +# Hello world :::tip TIP diff --git a/e2e/fixtures/client-redirects/doc/index.mdx b/e2e/fixtures/client-redirects/doc/index.mdx index 29658341f..716ed1421 100644 --- a/e2e/fixtures/client-redirects/doc/index.mdx +++ b/e2e/fixtures/client-redirects/doc/index.mdx @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/custom-headers/doc/index.mdx b/e2e/fixtures/custom-headers/doc/index.mdx index 0a9ccd4b2..03c5b9b4f 100644 --- a/e2e/fixtures/custom-headers/doc/index.mdx +++ b/e2e/fixtures/custom-headers/doc/index.mdx @@ -8,6 +8,6 @@ head: content: custom-meta-content-2 --- -# Hello World +# Hello world World Hello diff --git a/e2e/fixtures/custom-home-footer/doc/index.mdx b/e2e/fixtures/custom-home-footer/doc/index.mdx index cfa69ded5..94bbe201c 100644 --- a/e2e/fixtures/custom-home-footer/doc/index.mdx +++ b/e2e/fixtures/custom-home-footer/doc/index.mdx @@ -2,6 +2,6 @@ pageType: home --- -# Hello World +# Hello world hello diff --git a/e2e/fixtures/custom-icon/doc/index.mdx b/e2e/fixtures/custom-icon/doc/index.mdx index 29658341f..716ed1421 100644 --- a/e2e/fixtures/custom-icon/doc/index.mdx +++ b/e2e/fixtures/custom-icon/doc/index.mdx @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/custom-layout-ui-switch/doc/index.mdx b/e2e/fixtures/custom-layout-ui-switch/doc/index.mdx index 29658341f..716ed1421 100644 --- a/e2e/fixtures/custom-layout-ui-switch/doc/index.mdx +++ b/e2e/fixtures/custom-layout-ui-switch/doc/index.mdx @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/github-alert-mdxjs/doc/index.mdx b/e2e/fixtures/github-alert-mdxjs/doc/index.mdx index a573779f2..6922c1834 100644 --- a/e2e/fixtures/github-alert-mdxjs/doc/index.mdx +++ b/e2e/fixtures/github-alert-mdxjs/doc/index.mdx @@ -1,4 +1,4 @@ -# Hello World +# Hello world > [!TIP] > This is a 'tip' style block. diff --git a/e2e/fixtures/github-alert-mdxrs/doc/index.mdx b/e2e/fixtures/github-alert-mdxrs/doc/index.mdx index a573779f2..6922c1834 100644 --- a/e2e/fixtures/github-alert-mdxrs/doc/index.mdx +++ b/e2e/fixtures/github-alert-mdxrs/doc/index.mdx @@ -1,4 +1,4 @@ -# Hello World +# Hello world > [!TIP] > This is a 'tip' style block. diff --git a/e2e/fixtures/i18n/doc/en/guide/basic/quick-start.mdx b/e2e/fixtures/i18n/doc/en/guide/basic/quick-start.mdx index 51f307de5..1a0b5ba56 100644 --- a/e2e/fixtures/i18n/doc/en/guide/basic/quick-start.mdx +++ b/e2e/fixtures/i18n/doc/en/guide/basic/quick-start.mdx @@ -1,4 +1,4 @@ -# Quick Start +# Quick start [click by absolute path](/guide/basic/install) to go to install diff --git a/e2e/fixtures/link/doc/index.md b/e2e/fixtures/link/doc/index.md index 29658341f..716ed1421 100644 --- a/e2e/fixtures/link/doc/index.md +++ b/e2e/fixtures/link/doc/index.md @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/mdx-rs/doc/en/guide/quick-start.mdx b/e2e/fixtures/mdx-rs/doc/en/guide/quick-start.mdx index 30df48488..2fff3f2ca 100644 --- a/e2e/fixtures/mdx-rs/doc/en/guide/quick-start.mdx +++ b/e2e/fixtures/mdx-rs/doc/en/guide/quick-start.mdx @@ -1,4 +1,4 @@ -# Quick Start +# Quick start [click by absolute path](/guide/install) to go to install diff --git a/e2e/fixtures/modern-js/README.md b/e2e/fixtures/modern-js/README.md index 820189c0b..a233adf1d 100644 --- a/e2e/fixtures/modern-js/README.md +++ b/e2e/fixtures/modern-js/README.md @@ -1,6 +1,6 @@ # modern-js -## Get Started +## Get started 按开发环境的要求,运行和调试项目 diff --git a/e2e/fixtures/modern-js/docs/en/index.mdx b/e2e/fixtures/modern-js/docs/en/index.mdx index 8efcaae58..c9d7e57e8 100644 --- a/e2e/fixtures/modern-js/docs/en/index.mdx +++ b/e2e/fixtures/modern-js/docs/en/index.mdx @@ -1,4 +1,4 @@ -# Components Overview +# Components overview -## PackageManagerTabs B +## PackageManagerTabs b diff --git a/e2e/fixtures/plugin-api-docgen/doc/index.mdx b/e2e/fixtures/plugin-api-docgen/doc/index.mdx index 2f4403453..f48e8c361 100644 --- a/e2e/fixtures/plugin-api-docgen/doc/index.mdx +++ b/e2e/fixtures/plugin-api-docgen/doc/index.mdx @@ -1,4 +1,4 @@ -# Hello World +# Hello world ## API diff --git a/e2e/fixtures/plugin-typedoc/multi/doc/index.mdx b/e2e/fixtures/plugin-typedoc/multi/doc/index.mdx index 29658341f..716ed1421 100644 --- a/e2e/fixtures/plugin-typedoc/multi/doc/index.mdx +++ b/e2e/fixtures/plugin-typedoc/multi/doc/index.mdx @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/plugin-typedoc/single/doc/index.mdx b/e2e/fixtures/plugin-typedoc/single/doc/index.mdx index 29658341f..716ed1421 100644 --- a/e2e/fixtures/plugin-typedoc/single/doc/index.mdx +++ b/e2e/fixtures/plugin-typedoc/single/doc/index.mdx @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/production/doc/index.mdx b/e2e/fixtures/production/doc/index.mdx index 92403cd77..df35cc115 100644 --- a/e2e/fixtures/production/doc/index.mdx +++ b/e2e/fixtures/production/doc/index.mdx @@ -1,4 +1,4 @@ -# Hello World +# Hello world ![Image from relative path](./assets/example-0.png) diff --git a/e2e/fixtures/public-dir/doc/index.mdx b/e2e/fixtures/public-dir/doc/index.mdx index 8bb6a2cd7..30923d881 100644 --- a/e2e/fixtures/public-dir/doc/index.mdx +++ b/e2e/fixtures/public-dir/doc/index.mdx @@ -1,3 +1,3 @@ -# Hello World +# Hello world ![rspress-icon](/rspress-icon.png) diff --git a/e2e/fixtures/react-19/doc/index.mdx b/e2e/fixtures/react-19/doc/index.mdx index 29658341f..716ed1421 100644 --- a/e2e/fixtures/react-19/doc/index.mdx +++ b/e2e/fixtures/react-19/doc/index.mdx @@ -1 +1 @@ -# Hello World +# Hello world diff --git a/e2e/fixtures/ssg-fail-strict/doc/index.mdx b/e2e/fixtures/ssg-fail-strict/doc/index.mdx index 8ddf5e035..ac0d580db 100644 --- a/e2e/fixtures/ssg-fail-strict/doc/index.mdx +++ b/e2e/fixtures/ssg-fail-strict/doc/index.mdx @@ -1,4 +1,4 @@ -# Hello World +# Hello world import Component from './Component'; diff --git a/e2e/fixtures/tabs-component/doc/index.mdx b/e2e/fixtures/tabs-component/doc/index.mdx index 4ca06edde..fdf6acda0 100644 --- a/e2e/fixtures/tabs-component/doc/index.mdx +++ b/e2e/fixtures/tabs-component/doc/index.mdx @@ -1,14 +1,14 @@ import { Tabs, Tab } from 'rspress/theme'; -# Hello World +# Hello world -## Tab A +## Tab a content1 -## Tab B +## Tab b content2 @@ -16,6 +16,6 @@ import { Tabs, Tab } from 'rspress/theme'; content4 -## Tab C +## Tab c diff --git a/e2e/fixtures/title-number/doc/index.mdx b/e2e/fixtures/title-number/doc/index.mdx index f7fb59078..1e3dcab0a 100644 --- a/e2e/fixtures/title-number/doc/index.mdx +++ b/e2e/fixtures/title-number/doc/index.mdx @@ -1,4 +1,4 @@ -# Hello World +# Hello world ### -22222222 diff --git a/e2e/fixtures/view-transition/doc/index.md b/e2e/fixtures/view-transition/doc/index.md index 45b89db28..b0bd067f0 100644 --- a/e2e/fixtures/view-transition/doc/index.md +++ b/e2e/fixtures/view-transition/doc/index.md @@ -1,4 +1,4 @@ -# Hello World +# Hello world :::tip TIP diff --git a/e2e/fixtures/with-base/doc/en/guide/quick-start.mdx b/e2e/fixtures/with-base/doc/en/guide/quick-start.mdx index 015f3d57f..f28cec67f 100644 --- a/e2e/fixtures/with-base/doc/en/guide/quick-start.mdx +++ b/e2e/fixtures/with-base/doc/en/guide/quick-start.mdx @@ -1,3 +1,3 @@ -# Quick Start +# Quick start [enter install](/guide/install) diff --git a/e2e/tests/auto-nav-sidebar-dir-convension.test.ts b/e2e/tests/auto-nav-sidebar-dir-convension.test.ts index 4a3db7b19..f0edee040 100644 --- a/e2e/tests/auto-nav-sidebar-dir-convension.test.ts +++ b/e2e/tests/auto-nav-sidebar-dir-convension.test.ts @@ -35,7 +35,7 @@ test.describe('Auto nav and sidebar dir convention', async () => { 'index md convention', 'index mdx convention', 'same name', - 'index in metaIndex In Meta', + 'index in metaIndex in meta', 'no meta md', 'no meta mdx', ].join(','), diff --git a/e2e/tests/auto-nav-sidebar-no-meta.test.ts b/e2e/tests/auto-nav-sidebar-no-meta.test.ts index 8137a91b3..669341a04 100644 --- a/e2e/tests/auto-nav-sidebar-no-meta.test.ts +++ b/e2e/tests/auto-nav-sidebar-no-meta.test.ts @@ -30,9 +30,9 @@ test.describe('Auto nav and sidebar test', async () => { expect(sidebarTexts.join(',')).toEqual( [ 'API', - 'pluginPlugin APlugin B', + 'pluginPlugin aPlugin b', 'Commands', - 'configBasic ConfigBuild ConfigFront Matter ConfigTheme Config', + 'configBasic configBuild configFront matter configTheme config', ].join(','), ); }); diff --git a/e2e/tests/auto-nav-sidebar.test.ts b/e2e/tests/auto-nav-sidebar.test.ts index 2b83d12a9..cd9381527 100644 --- a/e2e/tests/auto-nav-sidebar.test.ts +++ b/e2e/tests/auto-nav-sidebar.test.ts @@ -47,11 +47,11 @@ test.describe('Auto nav and sidebar test', async () => { const h3Texts = await Promise.all(h3.map(element => element.textContent())); expect(h3Texts.join(',')).toEqual( [ - 'Basic Config', - 'Theme Config', - 'Front Matter Config', - 'Build Config', - 'Extname Config', + 'Basic config', + 'Theme config', + 'Front matter config', + 'Build config', + 'Extname config', 'Nested', 'Runtime API', 'Components', @@ -69,7 +69,7 @@ test.describe('Auto nav and sidebar test', async () => { 'nav', 'sidebar', 'builderConfig', - 'Default Config', + 'Default config', 'markdown', 'markdown.remarkPlugins', 'Usage', @@ -91,11 +91,11 @@ test.describe('Auto nav and sidebar test', async () => { const h2Texts = await Promise.all(h2.map(element => element.textContent())); expect(h2Texts.join(',')).toEqual( [ - 'Basic Config', - 'Theme Config', - 'Front Matter Config', - 'Build Config', - 'Extname Config', + 'Basic config', + 'Theme config', + 'Front matter config', + 'Build config', + 'Extname config', 'Nested', ].join(','), ); @@ -104,12 +104,12 @@ test.describe('Auto nav and sidebar test', async () => { const h3Texts = await Promise.all(h3.map(element => element.textContent())); expect(h3Texts.join(',')).toEqual( [ - 'Basic Config', - 'Theme Config', - 'Front Matter Config', - 'Build Config', - 'Extname Config', - 'Nested Config', + 'Basic config', + 'Theme config', + 'Front matter config', + 'Build config', + 'Extname config', + 'Nested config', ].join(','), ); @@ -122,7 +122,7 @@ test.describe('Auto nav and sidebar test', async () => { 'nav', 'sidebar', 'builderConfig', - 'Default Config', + 'Default config', 'markdown', 'markdown.remarkPlugins', 'Nested H2', @@ -173,7 +173,7 @@ test.describe('Auto nav and sidebar test', async () => { const h3 = await page.$$('.overview-group_8f375 h3'); const h3Texts = await Promise.all(h3.map(element => element.textContent())); - expect(h3Texts.join(',')).toEqual(['Nested Config'].join(',')); + expect(h3Texts.join(',')).toEqual(['Nested config'].join(',')); const a = await page.$$('.overview-group_8f375 ul a'); const aTexts = await Promise.all(a.map(element => element.textContent())); diff --git a/e2e/tests/basic.test.ts b/e2e/tests/basic.test.ts index f230994f0..2df2229a1 100644 --- a/e2e/tests/basic.test.ts +++ b/e2e/tests/basic.test.ts @@ -23,7 +23,7 @@ test.describe('basic test', async () => { await page.goto(`http://localhost:${appPort}`); const h1 = await page.$('h1'); const text = await page.evaluate(h1 => h1?.textContent, h1); - expect(text).toContain('Hello World'); + expect(text).toContain('Hello world'); // expect the .header-anchor to be rendered and take the correct href const headerAnchor = await page.$('.header-anchor'); const href = await page.evaluate( diff --git a/e2e/tests/custom-icon.test.ts b/e2e/tests/custom-icon.test.ts index ffbdb7dfc..8c8e339ac 100644 --- a/e2e/tests/custom-icon.test.ts +++ b/e2e/tests/custom-icon.test.ts @@ -25,7 +25,7 @@ test.describe('custom icon test', async () => { }); const h1 = await page.$('h1'); const text = await page.evaluate(h1 => h1?.textContent, h1); - await expect(text).toContain('Hello World'); + await expect(text).toContain('Hello world'); // TODO: custom icon sometimes failed due to https://github.com/web-infra-dev/rspack/issues/5871 // const headerAnchor = await page.$('.rspress-nav-search-button img'); diff --git a/e2e/tests/no-config-root.test.ts b/e2e/tests/no-config-root.test.ts index 400f0cf60..53b334211 100644 --- a/e2e/tests/no-config-root.test.ts +++ b/e2e/tests/no-config-root.test.ts @@ -29,7 +29,7 @@ test.describe('no config.root dev test', async () => { await page.goto(`http://localhost:${appPort}`); const h1 = await page.$('h1'); const text = await page.evaluate(h1 => h1?.textContent, h1); - expect(text).toContain('Hello World'); + expect(text).toContain('Hello world'); }); }); @@ -55,6 +55,6 @@ test.describe('no config.root build and preview test', async () => { }); const h1 = await page.$('h1'); const text = await page.evaluate(h1 => h1?.textContent, h1); - expect(text).toContain('Hello World'); + expect(text).toContain('Hello world'); }); }); diff --git a/e2e/tests/react-19.test.ts b/e2e/tests/react-19.test.ts index 3ee898752..6d85a011e 100644 --- a/e2e/tests/react-19.test.ts +++ b/e2e/tests/react-19.test.ts @@ -23,7 +23,7 @@ test.describe('React 19 test', async () => { await page.goto(`http://localhost:${appPort}`); const h1 = await page.$('h1'); const text = await page.evaluate(h1 => h1?.textContent, h1); - expect(text).toContain('Hello World'); + expect(text).toContain('Hello world'); }); test('404 page', async ({ page }) => { diff --git a/packages/cli/README.md b/packages/cli/README.md index 47ae83b75..43251478c 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -15,7 +15,7 @@ - **🔌 Providing Plugin System**: Providing a plugin system, you can customize the build process and theme according to your needs. - **📝 Component Document**: Support multi ways to preview your component demo. -## Getting Started +## Getting started Go to the [Quick Start](https://rspress.dev/guide/start/getting-started.html) to get started. @@ -25,7 +25,7 @@ Please read the [contributing guide](./CONTRIBUTING.md) and let's build Rspress If you have any questions, you can open an issue or go to [Discord](https://discord.com/invite/Cq6HweJM26) to communicate with us. -### Code of Conduct +### Code of conduct This repo has adopted the ByteDance Open Source Code of Conduct. Please check [Code of Conduct](./CODE_OF_CONDUCT.md) for more details. diff --git a/packages/create-rspress/template-basic/docs/_meta.json b/packages/create-rspress/template-basic/docs/_meta.json index aa4a9a2fc..ee21b24f2 100644 --- a/packages/create-rspress/template-basic/docs/_meta.json +++ b/packages/create-rspress/template-basic/docs/_meta.json @@ -5,7 +5,7 @@ "activeMatch": "/guide/" }, { - "text": "Hello World", + "text": "Hello world", "link": "/hello/", "activeMatch": "/hello/" }, diff --git a/packages/create-rspress/template-basic/docs/guide/index.md b/packages/create-rspress/template-basic/docs/guide/index.md index e838a8f6b..a75c95c3c 100644 --- a/packages/create-rspress/template-basic/docs/guide/index.md +++ b/packages/create-rspress/template-basic/docs/guide/index.md @@ -7,10 +7,10 @@ Rspress supports not only Markdown but also [MDX](https://mdxjs.com/), a powerfu MDX is a superset of Markdown, which means you can write Markdown files as usual. For example: ```md -# Hello World +# Hello world ``` -## Use Component +## Use component When you want to use React components in Markdown files, you should name your files with `.mdx` extension. For example: @@ -18,18 +18,18 @@ When you want to use React components in Markdown files, you should name your fi // docs/index.mdx import { CustomComponent } from './custom'; -# Hello World +# Hello world ``` -## Front Matter +## Front matter You can add Front Matter at the beginning of your Markdown file, which is a YAML-formatted object that defines some metadata. For example: ```yaml --- -title: Hello World +title: Hello world --- ``` @@ -39,7 +39,7 @@ You can also access properties defined in Front Matter in the body, for example: ```markdown --- -title: Hello World +title: Hello world --- # {frontmatter.title} @@ -48,10 +48,10 @@ title: Hello World The previously defined properties will be passed to the component as `frontmatter` properties. So the final output will be: ```html -

Hello World

+

Hello world

``` -## Custom Container +## Custom container You can use the `:::` syntax to create custom containers and support custom titles. For example: @@ -117,9 +117,9 @@ This is a `block` of `Custom Title` This is a `block` of `Custom Title` ::: -## Code Block +## Code block -### Basic Usage +### Basic usage You can use the \`\`\` syntax to create code blocks and support custom titles. For example: @@ -145,7 +145,7 @@ console.log('Hello World'); console.log('Hello World'); ``` -### Show Line Numbers +### Show line numbers If you want to display line numbers, you can enable the `showLineNumbers` option in the config file: @@ -158,7 +158,7 @@ export default { }; ``` -### Wrap Code +### Wrap code If you want to wrap long code line by default, you can enable the `defaultWrapCode` option in the config file: @@ -171,7 +171,7 @@ export default { }; ``` -### Line Highlighting +### Line highlighting You can also apply line highlighting and code block title at the same time, for example: diff --git a/packages/create-rspress/template-basic/docs/hello.md b/packages/create-rspress/template-basic/docs/hello.md index d08771599..0e509541c 100644 --- a/packages/create-rspress/template-basic/docs/hello.md +++ b/packages/create-rspress/template-basic/docs/hello.md @@ -1,4 +1,4 @@ -# Hello World! +# Hello world! ## Start diff --git a/packages/create-rspress/template-common/README.md b/packages/create-rspress/template-common/README.md index d23c39ba5..8a9c78ca4 100644 --- a/packages/create-rspress/template-common/README.md +++ b/packages/create-rspress/template-common/README.md @@ -1,4 +1,4 @@ -# Rspress Website +# Rspress website ## Setup @@ -8,7 +8,7 @@ Install the dependencies: npm install ``` -## Get Started +## Get started Start the dev server: diff --git a/packages/document/README.md b/packages/document/README.md new file mode 100644 index 000000000..628ffdf9d --- /dev/null +++ b/packages/document/README.md @@ -0,0 +1,5 @@ +# Rspress Website + +## Writing style guide + +The same as Rspack: [Writing style guide](https://github.com/web-infra-dev/rspack/tree/main/website#writing-style-guide). diff --git a/packages/document/docs/en/api/client-api/api-components.mdx b/packages/document/docs/en/api/client-api/api-components.mdx index 835f09735..a4878e6a6 100644 --- a/packages/document/docs/en/api/client-api/api-components.mdx +++ b/packages/document/docs/en/api/client-api/api-components.mdx @@ -1,4 +1,4 @@ -# Built-in Components +# Built-in components import BuiltinComponents from '../../fragments/builtin-components'; diff --git a/packages/document/docs/en/api/client-api/api-runtime.mdx b/packages/document/docs/en/api/client-api/api-runtime.mdx index f45ec89a1..3ea048a66 100644 --- a/packages/document/docs/en/api/client-api/api-runtime.mdx +++ b/packages/document/docs/en/api/client-api/api-runtime.mdx @@ -63,7 +63,7 @@ import UseI18n from '../../fragments/useI18n'; > See more in [Internationalization](/guide/default-theme/i18n). -## Router Hook +## Router hook The framework internally uses and re-exports all APIs of `react-router-dom`, you can use it like this: diff --git a/packages/document/docs/en/api/config/config-basic.mdx b/packages/document/docs/en/api/config/config-basic.mdx index 16d991d0a..3255838a8 100644 --- a/packages/document/docs/en/api/config/config-basic.mdx +++ b/packages/document/docs/en/api/config/config-basic.mdx @@ -1,4 +1,4 @@ -# Basic Config +# Basic config ## root diff --git a/packages/document/docs/en/api/config/config-build.mdx b/packages/document/docs/en/api/config/config-build.mdx index 0d0acc5b1..469cca722 100644 --- a/packages/document/docs/en/api/config/config-build.mdx +++ b/packages/document/docs/en/api/config/config-build.mdx @@ -1,4 +1,4 @@ -# Build Config +# Build config ## builderConfig @@ -115,7 +115,7 @@ export default defineConfig({ }); ``` -### Default Config +### Default config If you need to view the default Rspack or Rsbuild configs, you can add the `DEBUG=rsbuild` parameter when running the `rspress dev` or `rspress build` command: diff --git a/packages/document/docs/en/api/config/config-frontmatter.mdx b/packages/document/docs/en/api/config/config-frontmatter.mdx index c0e2b2c88..c1044580a 100644 --- a/packages/document/docs/en/api/config/config-frontmatter.mdx +++ b/packages/document/docs/en/api/config/config-frontmatter.mdx @@ -1,4 +1,4 @@ -# Front Matter Config +# Front matter config ## title diff --git a/packages/document/docs/en/api/config/config-theme.mdx b/packages/document/docs/en/api/config/config-theme.mdx index d75784785..af6f5981c 100644 --- a/packages/document/docs/en/api/config/config-theme.mdx +++ b/packages/document/docs/en/api/config/config-theme.mdx @@ -1,4 +1,4 @@ -# Theme Config +# Theme config Theme config is located under `themeConfig` in the `doc` param. For example: diff --git a/packages/document/docs/en/fragments/builtin-components.mdx b/packages/document/docs/en/fragments/builtin-components.mdx index f7a3c8d8d..0dee574d7 100644 --- a/packages/document/docs/en/fragments/builtin-components.mdx +++ b/packages/document/docs/en/fragments/builtin-components.mdx @@ -507,7 +507,7 @@ interface TabProps { The `value` field is used to identify the current tab, if not passed, the default label will be used. -## Table of Contents +## Table of contents Render TOC of current page diff --git a/packages/document/docs/en/guide/advanced/custom-search.mdx b/packages/document/docs/en/guide/advanced/custom-search.mdx index ae0001cc7..2dacc63fd 100644 --- a/packages/document/docs/en/guide/advanced/custom-search.mdx +++ b/packages/document/docs/en/guide/advanced/custom-search.mdx @@ -1,4 +1,4 @@ -# Customize Search Functions +# Customize search functions In some scenarios, we need to customize the search function, such as: @@ -28,7 +28,7 @@ export default defineConfig({ The value of the `search.searchHooks` config item is a file path. This file will export the corresponding hook logic, such as `onSearch`, so that you can customize the capabilities of the search at run time. We can call this file a **`searchHooks` module**. -## Hook Functions in searchHooks +## Hook functions in searchHooks Next, let us introduce the hook functions in searchHooks, namely `beforeSearch`, `onSearch`, `afterRender` and `render`. diff --git a/packages/document/docs/en/guide/advanced/custom-theme.mdx b/packages/document/docs/en/guide/advanced/custom-theme.mdx index 55d2b765e..fb536fe3e 100644 --- a/packages/document/docs/en/guide/advanced/custom-theme.mdx +++ b/packages/document/docs/en/guide/advanced/custom-theme.mdx @@ -1,4 +1,4 @@ -# Custom Theme +# Custom theme This article will tell you how to develop custom theme. @@ -101,7 +101,7 @@ export default { export * from 'rspress/theme'; ``` -### 3. Custom Home page and 404 page +### 3. Custom home page and 404 page In addition to the slot method, if you want to extend the default theme components, you can also customize the Home page components and 404 page components, as well as other Rspress [built-in components](https://github.com/web-infra-dev/rspress/tree/main/packages/theme-default/src/components) @@ -132,7 +132,7 @@ export * from 'rspress/theme'; Of course, you may need to use page data during the development process, you can get it through [`Runtime API`](/api/client-api/api-runtime). -### 4. Custom Icon +### 4. Custom icon If you want to modify the icons used in the default theme component individually, just put the icons with the same name in the theme/assets directory. @@ -249,7 +249,7 @@ function Layout() { } ``` -#### Route Hook +#### Route hook [react-router-dom](https://reactrouter.com/) is used inside the framework to implement routing, so you can directly use the Hook of `react-router-dom`, for example: @@ -262,14 +262,14 @@ function Layout() { } ``` -### 3. Reusing Search Functionality +### 3. Reusing search functionality The default theme comes with built-in search functionality, which we can break down into two components: 1. The search box, i.e., the entry point to invoke the search. 2. The search panel that pops up after clicking on the search box. -#### Full Reuse +#### Full reuse If you want to fully reuse the search functionality, you can directly import the `Search` component, like so: @@ -281,7 +281,7 @@ function MySearch() { } ``` -#### Reusing the Search Panel +#### Reusing the search panel If you only want to reuse the search panel and customize the search box part, then you need to import the `SearchPanel` component in your theme component, like so: @@ -302,7 +302,7 @@ function MySearch() { In this case, you need to maintain the `focused` state and `setFocused` method yourself, and pass them as props to the `SearchPanel` component for controlling the display and hiding of the search panel. -#### Reuse Default Full Text Search Logic +#### Reuse default full text search logic If you want to reuse the default full text search logic, you can use the `useFullTextSearch` Hook, for example: diff --git a/packages/document/docs/en/guide/advanced/extend-build.mdx b/packages/document/docs/en/guide/advanced/extend-build.mdx index 55cfe2cdd..932129e72 100644 --- a/packages/document/docs/en/guide/advanced/extend-build.mdx +++ b/packages/document/docs/en/guide/advanced/extend-build.mdx @@ -1,4 +1,4 @@ -# Build Extension +# Build extension ## Rsbuild @@ -44,7 +44,7 @@ export default defineConfig({ }); ``` -## MDX Compilation +## MDX compilation The compilation of MDX in the framework is based on [unified](https://github.com/unifiedjs/unified), and you can add related compilation plugins through `markdown` configuration. for example : diff --git a/packages/document/docs/en/guide/basic/auto-nav-sidebar.mdx b/packages/document/docs/en/guide/basic/auto-nav-sidebar.mdx index 5f7b2bb8f..802c23bdd 100644 --- a/packages/document/docs/en/guide/basic/auto-nav-sidebar.mdx +++ b/packages/document/docs/en/guide/basic/auto-nav-sidebar.mdx @@ -1,4 +1,4 @@ -# Auto Nav/Sidebar +# Autogenerated navigation In Rspress, in addition to declaring [nav](/api/config/config-theme.html#nav) and [sidebar](/api/config/config-theme.html#sidebar) through `themeConfig` in the config file, you can also automatically generate the nav bar and sidebar by declaring the `_meta.json` description file. We recommend the latter because it can make the config file more concise and clear. @@ -6,7 +6,7 @@ In Rspress, in addition to declaring [nav](/api/config/config-theme.html#nav) an Automated navbar/sidebar will only work if there are no `nav` and `sidebar` configurations in the config file `rspress.config.ts`. ::: -## Basic Concept +## Basic concept First, `_meta.json` can be divided into two categories: navbar level and sidebar level. The difference between the two is that the navigation-level `_meta.json` lives in the document root, while the sidebar-level `_meta.json` lives in a subdirectory of the document root. for example: @@ -45,7 +45,7 @@ docs └── plugin-development.md ``` -## Navbar Level Config +## Navbar level config In the case of the navigation bar level, you can fill in an array in `_meta.json`, and its type is exactly the same as the nav config of the default theme. For details, please refer to [nav config](/api/config/config-theme.html#nav). for example: @@ -59,7 +59,7 @@ In the case of the navigation bar level, you can fill in an array in `_meta.json ] ``` -## Sidebar Level Config +## Sidebar level config In the case of the sidebar level, you can fill in `_meta.json` an array with each item of the following type: @@ -259,7 +259,7 @@ Among them, `link` indicates the link address, `label` indicates the display nam } ``` -### Complete Example +### Complete example Here is a complete example using the three types above: @@ -286,7 +286,7 @@ Here is a complete example using the three types above: ] ``` -### No Config Usage +### No config usage In some directories, you don't need to configure `_meta.json` and let the framework automatically generate the sidebar. This requires ensuring that the directory contains only documents, not subdirectories, and you have no requirements for the order of documents. For example, there is now the following document structure: @@ -324,7 +324,7 @@ basic └── 3-plugin-development.md ``` -### Add SVG Icons Before Titles +### Add SVG icons before titles In addition, you can add icons before the title through the `tag` config, like this: diff --git a/packages/document/docs/en/guide/basic/conventional-route.mdx b/packages/document/docs/en/guide/basic/conventional-route.mdx index 07d569349..d91303e25 100644 --- a/packages/document/docs/en/guide/basic/conventional-route.mdx +++ b/packages/document/docs/en/guide/basic/conventional-route.mdx @@ -1,4 +1,4 @@ -# Conventional Route +# Conventional route ## What is it? @@ -6,7 +6,7 @@ Rspress uses file system routing, and the file path of the page is simply mapped For example, if there is a file named `foo.md` in the `docs` directory, the routing path for that file will be `/foo`. -## Mapping Rules +## Mapping rules Rspress automatically scans the root directory and all subdirectories, and maps file paths to route paths. For example, if you have the following file structure: @@ -28,7 +28,7 @@ The specific mapping rules are as follows: | `/foo/bar.md` | `/foo/bar` | | `/zoo/index.md` | `/zoo/` | -## Component Routing +## Component routing In conventional routing, in addition to `.md(x)` files, you can also use `.tsx` files as route components. By default, a component is exported in `.tsx`, and this component will be automatically registered in the route. For example: @@ -50,7 +50,7 @@ export const frontmatter = { For detailed meanings of each `pageType`, please refer to the [API documentation](/api/config/config-frontmatter#pagetype). -## Custom Behavior +## Custom behavior If you want to customize the routing behavior, you can use the `route` field in the configuration file. For example: @@ -67,7 +67,7 @@ export default defineConfig({ }); ``` -## Best Practices +## Best practices We recommend that you place documentation files in the `docs` directory to make your project more clear. For non-documentation content, such as custom components, util functions, etc., they can be maintained outside the `docs` directory. For example: diff --git a/packages/document/docs/en/guide/basic/custom-page.mdx b/packages/document/docs/en/guide/basic/custom-page.mdx index bf7ea0549..a8088df90 100644 --- a/packages/document/docs/en/guide/basic/custom-page.mdx +++ b/packages/document/docs/en/guide/basic/custom-page.mdx @@ -1,6 +1,6 @@ import { PackageManagerTabs } from '@theme'; -# Customizing Page +# Customizing page Rspress provides several ways for you to customize the content of your pages, including: @@ -8,11 +8,11 @@ Rspress provides several ways for you to customize the content of your pages, in - Adding custom global styles. - Customizing page layout structure. -## Custom Global Components +## Custom global components In some scenarios, you may need to add some custom global components to the page. The framework provides a config item `globalUIComponents` to achieve this function. -### How to Use +### How to use Add the following config in `rspress.config.ts`: @@ -46,11 +46,11 @@ import GlobalUIComponents from '@en/fragments/global-ui-components'; -## Custom Styles +## Custom styles In some scenarios, you may need to add some global styles on top of the theme UI. The framework provides a configuration item `globalStyles` to achieve this function. -### How to Use +### How to use Add the following configuration in `rspress.config.ts`: @@ -136,7 +136,7 @@ module.exports = { > For most up to date configuration, please refer to the official [Tailwind CSS documentation](https://tailwindcss.com/docs/installation/using-postcss). -## Custom Layout Structure +## Custom layout structure ### Using pageType @@ -167,7 +167,7 @@ import PageType from '@en/fragments/page-type'; -### Using Fine-grained Switches +### Using fine-grained switches In addition to the `pageType` page layout level configuration, Rspress also provides more fine-grained switches. You can configure other fields in the frontmatter. These fields and their meanings are as follows: @@ -188,7 +188,7 @@ globalUIComponents: false --- ``` -### Using URL Parameters as Switches +### Using URL parameters as switches In addition, you can use URL parameters to control the layout structure of the page at runtime, such as: diff --git a/packages/document/docs/en/guide/basic/deploy.mdx b/packages/document/docs/en/guide/basic/deploy.mdx index 18880f255..5a8e7ae38 100644 --- a/packages/document/docs/en/guide/basic/deploy.mdx +++ b/packages/document/docs/en/guide/basic/deploy.mdx @@ -7,7 +7,7 @@ In this section, we will discuss the deployment of the project. We assume that y - Project base path configuration. - Choose deployment platform for deployment. -## Build and Preview +## Build and preview Before deployment, we need to first build the project in the production environment and preview it locally to ensure that the project can run normally. In Rspress projects, we can use the following `scripts` commands to build and preview: @@ -28,7 +28,7 @@ For the preview command, you can specify the preview port number through the `-- It is worth noting that the final output will be output to the `doc_build` directory under the project root directory. The content in this directory is what we need to deploy. -## Static Resource Prefix Configuration +## Static resource prefix configuration We can divide the deployment output into two parts: HTML files and static resources. HTML files refer to the HTML files in the output directory. These files are the files we finally deploy to the server. @@ -52,7 +52,7 @@ In this way, when referencing static resources in HTML, the prefix will be autom ``` -## Project Base Path Configuration +## Project base path configuration When deploying, we may need to deploy the project to a subpath. For example, if you plan to deploy your site to `https://foo.github.io/bar/`, then you should set the `base` parameter to `"/bar/"`: @@ -64,15 +64,15 @@ export default defineConfig({ }); ``` -## Deployment in Platform +## Deployment in platform After completing the above configuration, we can deploy the output to the server. You have many choices, such as `GitHub Pages`, `Netlify`, `Vercel`, etc. Here we take `GitHub Pages` and `Netlify` as examples to explain how to deploy. -### Deploy via GitHub Actions +### Deploy via GitHub actions If your project is hosted on `GitHub`, then you can deploy via `GitHub Pages`. `GitHub Pages` is a static website hosting service provided by `GitHub`, which allows you to directly deploy your project to `GitHub` without having to build your own server. -#### 1. Create Workflow File +#### 1. Create workflow file First, you need to create a file named `.github/workflows/deploy.yml` in the project root directory, with the following content: @@ -141,7 +141,7 @@ jobs: In the `Pages` column of the repository `Settings` interface, you can choose `GitHub Actions` as the deployment source. -#### 3. Push Code to Main Branch +#### 3. Push code to main branch When you push the code to the `main` branch, `GitHub Actions` will automatically execute the deployment process. You can view the progress of the deployment in the `Actions` column. After the deployment is complete, you can access your site through `https://.github.io//`. @@ -149,7 +149,7 @@ When you push the code to the `main` branch, `GitHub Actions` will automatically `Netlify` is a Web application deployment platform, which allows you to directly deploy your project to `Netlify` without having to build your own server. -#### Basic Configuration +#### Basic configuration Deploying a project on `Netlify` is very simple. You only need to import your GitHub repository, and then configure some basic information to deploy. Just configure the following two fields: @@ -158,11 +158,11 @@ Deploying a project on `Netlify` is very simple. You only need to import your Gi Then click the `Deploy site` button to complete the deployment. -#### Configure Custom Domain +#### Configure custom domain If you want to bind your site to your own domain, you can configure it in the `Domain management` column of `Netlify`. The specific configuration method can refer to the [Netlify official documentation](https://docs.netlify.com/domains-https/custom-domains/). -### Deploy to Kinsta Static Site Hosting +### Deploy to Kinsta static site hosting You can deploy your Rspress site on [Kinsta](https://kinsta.com/static-site-hosting/). @@ -186,7 +186,7 @@ You can deploy your Rspress site on [Kinsta](https://kinsta.com/static-site-host [Zeabur](https://zeabur.com) is a platform for deploying services instantly, which allows you to directly deploy your Rspress site without any other configurations. -#### How to Deploy +#### How to deploy First of all, you need to [create a Zeabur account](https://zeabur.com). Then, follow the instructions to create a project and install a GitHub app to authorize Zeabur get your Rspress repository. diff --git a/packages/document/docs/en/guide/basic/ssg.mdx b/packages/document/docs/en/guide/basic/ssg.mdx index bb6b04e62..2708b1d41 100644 --- a/packages/document/docs/en/guide/basic/ssg.mdx +++ b/packages/document/docs/en/guide/basic/ssg.mdx @@ -1,4 +1,4 @@ -# Static Site Generation +# Static site generation ## Introduction @@ -27,7 +27,7 @@ The essence of static site generation is to pre-render components at the build s Considering the cost of static site generation, Rspress only pre-renders during production environment builds. In the development environment, it still uses the traditional SPA rendering mode without pre-rendering. -## Adding Custom Site Content +## Adding custom site content Through `builderConfig.html.tags`, you can customize the site HTML content, such as adding statistical code, adding scripts and styles, etc. diff --git a/packages/document/docs/en/guide/basic/static-assets.mdx b/packages/document/docs/en/guide/basic/static-assets.mdx index 3504497ec..b781812ff 100644 --- a/packages/document/docs/en/guide/basic/static-assets.mdx +++ b/packages/document/docs/en/guide/basic/static-assets.mdx @@ -1,4 +1,4 @@ -# Static Assets +# Static assets ## Introduction @@ -26,7 +26,7 @@ export default defineConfig({ ::: -## Top Left Corner Logo +## Top left corner logo In Rspress, you can specify the logo image at the top left corner through the `logo` field. For example: @@ -79,7 +79,7 @@ The icon field supports string config, with the following specific ways: - Configured as an **absolute path**, such as `/favicon.ico`. In this case, Rspress will automatically find the `favicon.ico` icon in the `public directory` of your **document root directory** and display it. - Configured as a **relative path**, such as `./docs/public/favicon.ico`. In this case, Rspress will find the `favicon.ico` icon based on the project root directory and display it. -## Homepage Logo +## Homepage logo In the [frontmatter configuration](/api/config/config-frontmatter.html#hero) of the homepage, you can specify the homepage logo image through the `hero.image.src` field. For example: @@ -99,7 +99,7 @@ Here, src is a string, supporting the following configurations: - Configured as an **external link**, like the above example. - Configured as an **absolute path**, such as `/rspress-logo.png`. In this case, Rspress will automatically find the `rspress-logo.png` image in the `public directory` of your **document root directory** and display it. -## Static assets Used in .md(x) Files +## Static assets used in .md(x) files You can import static assets in `markdown` (or `mdx`) files. Both relative paths and absolute paths are supported. For example, if there is an image in the same directory as the markdown, you can reference it like this: @@ -148,7 +148,7 @@ import { normalizeImagePath } from 'rspress/runtime'; Not only images, but you can also import videos, audios and other static assets in markdown files. -## Other Static Assets +## Other static assets In some scenarios, you may need to deploy certain specific static assets, such as adding the deployment configuration file `_headers` of `Netlify` to specify custom HTTP response headers. diff --git a/packages/document/docs/en/guide/basic/use-mdx.mdx b/packages/document/docs/en/guide/basic/use-mdx.mdx index 93d4e9168..c303ba990 100644 --- a/packages/document/docs/en/guide/basic/use-mdx.mdx +++ b/packages/document/docs/en/guide/basic/use-mdx.mdx @@ -7,17 +7,17 @@ Rspress supports [MDX](https://mdxjs.com/), a powerful way to develop content. MDX is a superset of Markdown, which means you can write Markdown files as usual. For example: ```md -# Hello World +# Hello world ``` -## Use Component +## Use component When you want to use React components in Markdown files, you should name your files with `.mdx` extension. For example: ```mdx title="index.mdx" import { CustomComponent } from './custom'; -# Hello World +# Hello world ``` @@ -52,13 +52,13 @@ export Button = () =>