Installation
This article explains how this website was built from scratch. I chose the Docusaurus TypeScript variant based on the project's scope.
Initialization
Docusaurus requires Node.js version 18 or up. I use npm as the package manager.
npx create-docusaurus@latest website classic --typescript
- npm
- Yarn
- pnpm
npm run start
yarn run start
pnpm run start
Using Yarn
important
Installing Yarn globally is NOT recommended.
Instead, we can use Corepack, which enables us to define our preferred package manager and its version in the package.json
file.
corepack enable
yarn set version stable
yarn install
yarn start
tip
If you ran into an error, you can follow the troubleshooting guide and create a yarn.lock
file:
- Bash
- CMD
- PowerShell
ni yarn.lock
echo. > yarn.lock
New-Item yarn.lock -ItemType File
Run locally
- npm
- Yarn
- pnpm
npm run build
yarn build
pnpm run build
Alternatively, you can also run the following:
- npm
- Yarn
- pnpm
npm run build && npm run serve
yarn build&& yarn serve
pnpm run build&& pnpm run serve