mirror of
https://github.com/halo-dev/docs.git
synced 2026-01-13 06:03:55 +08:00
aa466d9b72125ec19e33853ac02369d114d9c5bd
Support for building projects via rspack has been added in the latest Canary version of Docusaurus, which significantly improves compilation speed.
```bash
❯ hyperfine --prepare 'pnpm clear' --runs 5 'DOCUSAURUS_FASTER=false pnpm build' 'DOCUSAURUS_FASTER=true pnpm build'
Benchmark 1: DOCUSAURUS_FASTER=false pnpm build
Time (mean ± σ): 70.715 s ± 17.150 s [User: 134.096 s, System: 31.651 s]
Range (min … max): 52.330 s … 88.497 s 5 runs
Benchmark 2: DOCUSAURUS_FASTER=true pnpm build
Time (mean ± σ): 30.094 s ± 4.572 s [User: 64.061 s, System: 28.384 s]
Range (min … max): 25.832 s … 37.655 s 5 runs
Summary
DOCUSAURUS_FASTER=true pnpm build ran
2.35 ± 0.67 times faster than DOCUSAURUS_FASTER=false pnpm build
```
see: https://github.com/facebook/docusaurus/issues/10556#issuecomment-2407671873
```release-note
None
```
The open-source repo for docs.halo.run
This website is built using Docusaurus 2, a modern static website generator.
Installation
$ pnpm install
If you don’t have pnpm installed, you can install it with the following command:
npm install -g pnpm
Local Development
$ pnpm start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Build
$ pnpm build
This command generates static content into the build directory and can be served using any static contents hosting service.
Description
Languages
JavaScript
65%
TypeScript
19%
SCSS
12.6%
CSS
3.3%
Shell
0.1%