一、Use of the Site vuepress and vuepress-theme-plume build generation。
- vue3 + ts + vite + router construct
- This project can meet the needs of
blog
,notes
,knowledge base
,product documentation
- Create using tools such as
pnpm
,yarn
, andnpm
(recommendedpnpm
)
// pnpm install
pnpm create vuepress-theme-plume@latest
- Create Diagram
pnpm i
// Start development service
pnpm docs:dev
// Build production package
pnpm docs:build
// Build production package
pnpm docs:preview
// Update vuepress and themes
pnpm vp-update
Theme has been created github actions: .github/workflows/docs-deploy.yml
,You also need to make the following settings in the GitHub repository:
-
settings > Actions > General
,Pull to the bottom of the page, inWorkflow permissions
Next, check the boxRead and write permissions
,And click the save button -
settings > Pages
, inBuild and deployment
centre,Source
selectDeploy from a branch
,Branch
selectgh-pages
,And click the save button (The first creation may not have a 'gh pages' branch. You can complete the above settings first, push the code to the main branch once, and wait for the' GitHub actions' to complete before setting it up.) -
Modify the 'base' option in 'docs/. vuepress/config. ts':
- If you are planning to publish to 'https://. github. io/', you can skip this step because 'base' defaults to '/'.
- If you are planning to publish to<https://. lithub. io//>, which means your warehouse address is
https://github.com/ <USERNAME>/<REPO>
, Then set 'base' to '//'.
If you need to customize a domain name, please refer to Github Pages document