Docs Dev Guide
Directory Structure
/
- .eslintignore
- .eslintrc.cjs
- .prettierignore
- .prettierrc
- README.md
content
.vitepress
components
- LocalSearchBox.vue
- NavBar.vue
- NavBarMenuLink.vue
- NavBarTranslations.vue
composables
- index.ts
- config.ts
configs
- index.ts
locales
- en.ts
- index.ts
- zh-CN.ts
search
- index.ts
- stopwords.ts
- translate.ts
- mathjax.ts
- shim.d.ts
- api-examples.md
developer-guide
- dev-docs.md
- index.md
- markdown-examples.md
public
- image.jpg
- logo.svg
- tsconfig.json
zh-CN
- api-examples.md
developer-guide
deploy
- k8s-deploy.md
- local-deploy.md
- dev-backend.md
- dev-docs.md
- dev-frontend.md
- structure-and-guidelines.md
- index.md
- markdown-examples.md
overview
- installation.md
- quick-start.md
- system-overview.md
user-guide
- learnware-deploy.md
- learnware-search.md
learnware-upload
- prepare.md
- upload.md
- package.json
- pnpm-lock.yaml
Environment Setup
- 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# 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- Install
node
nvm install nodenvm install node- Install
pnpm
npm install -g pnpmnpm install -g pnpm- Install Dependencies: Make sure you are in the project's root directory
Beiming-System/docs/.
pnpm installpnpm installDevelopment
Run Development Server
Run the following command to start the development server.
pnpm devpnpm devIf everything goes well, you will see the following output:
> vitepress dev docs
vitepress v1.0.0-rc.21
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h to show help> vitepress dev docs
vitepress v1.0.0-rc.21
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h to show helpAfterward, make changes to markdown files under the content directory, and the browser will automatically reload to display the changes.
Adding Static Files
If you want to add static files like images, you can place them in the Beiming-System/docs/content/public/ directory. Then, you can access them in markdown files like this:
Setting Up Navigation and Sidebar
You should set up this according to the language. For example, if you want to set up navigation and sidebar for the en language, you should edit the Beiming-System/docs/content/.vitepress/config/locales/en.ts file.
Other Configuration
You can find more configuration options in the VitePress documentation.
Deployment
Run the following command to build static files.
pnpm buildpnpm buildStatic files will be generated in the Beiming-System/docs/content/.vitepress/dist/ directory. You can deploy them to any static file server.