beimingwu/docs
GeneLiuXe ed2e012881 perf(docs): replace with github link 2024-02-29 16:02:20 +08:00
..
content perf(docs): replace with github link 2024-02-29 16:02:20 +08:00
.eslintignore chore(docs): add eslint and prettier 2023-10-31 17:34:14 +08:00
.eslintrc.cjs chore(docs): add eslint and prettier 2023-10-31 17:34:14 +08:00
.prettierignore chore(docs): setup eslint prettier and hook 2023-10-31 18:02:08 +08:00
.prettierrc chore(docs): add eslint and prettier 2023-10-31 17:34:14 +08:00
README.md perf(docs): polish details 2024-01-08 21:28:26 +08:00
package.json feat(docs): write dev docs 2023-10-31 22:30:45 +08:00
pnpm-lock.yaml chore(docs): changed with npm registry 2023-11-09 11:11:22 +08:00

README.md

Beimingwu System Docs

Environment Setup

  1. Install nvm
# use curl:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
# or use wget:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
  1. Install node
nvm install node
  1. Install pnpm
npm install -g pnpm
  1. Install dependencies: Make sure you are in the root directory Beiming-System/docs/ of this project.
pnpm install

Development

Run a development server

Run the following command to start a development server.

pnpm dev

If everything goes well, you should see the following output:

> vitepress dev docs

  vitepress v1.0.0-rc.21

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help

After that, change a markdown file in the content directory, and the browser will automatically reload to show the changes.

Add static files

If you want to add static files, such as images, you can put them in the Beiming-System/docs/content/public/ directory. Then you can access them in the markdown file like this:

![image](/image.png)

Setup the navbar and the sidebar

You should setup language by language. For example, if you want to setup the navbar and the sidebar for the en language, you should edit the Beiming-System/docs/content/.vitepress/config/locales/en.ts file.

Other configurations

You can find more configurations in the VitePress documentation.

Deployment

Run the following command to build the static files.

pnpm build

The static files will be generated in the Beiming-System/docs/content/.vitepress/dist/ directory. You can deploy them to any static file server.