Best VuePress2 Template. Get a beautiful and configured default theme document in a minute.
Features:
- 🎉 VuePress 2 (Vue 3 + Vite 5 + TypeScript)
- ✨ VuePress MarkDown Enhance
- 📖 Support LaTeX math formulas (use KaTeX)
- 📈 Mermaid (optional, installed by default)
- 💡 chartjs (optional, please refer to the VuePress MarkDown Enhance)
- 📊 Echarts (optional, please refer to the VuePress MarkDown Enhance)
- 🎞️ Presentation (use
reveal.js
, optional, please refer to the VuePress MarkDown Enhance) - 📐 Flowchart (optional, please refer to the VuePress MarkDown Enhance)
- 📋 Copy code support
- 📜 Auto catalog generation
- 🔍 Static search support
- 🎇 Auto format
git clone https://github.com/Sun-ZhenXing/vuepress-solid-template
cd vuepress-solid-template
pnpm i
pnpm dev
The only thing you need to do is to configure docs/.vuepress/config.ts
:
- change
USER_NAME
to yours. - change
BASE_PATH
to your repo name.
Change ${YOUR_REPO}
to the address of your remote repository.
cd vuepress-my-docs
rm -rf .git && git init && git add .
git commit -m "init from Sun-ZhenXing/vuepress-solid-template"
git remote add origin ${YOUR_REPO}
git branch -M main
git push -u origin main
Build with pnpm
:
pnpm i
pnpm build
You can find the generated static files in docs/.vuepress/dist
.
Build with Docker:
docker build -t vuepress-solid-template .
docker run -itd -p 80:80 vuepress-solid-template
Now you can visit http://localhost to see your document.
If you don't want it, reomve .github/workflows/
file.
When building in GitHub Actions for the first time, an error will be reported and an email will be sent to you. Don't panic because you haven't set up GitHub Pages yet.
If you need to open GitHub Pages:
- Open your GitHub repo page
- Click
Settings
- Click
Actions
, then clickGeneral
- Find
Workflow permissions
, selectRead and write permissions
, save - If you have not successfully executed GitHub Actions at this time, you need to manually execute them once. Open the actions you just created and click
re-run all jobs
- Click
Pages
on the sidebar, gotoBuild and deployment
- Config as
Branch: gh-pages /(root)
, or force HTTPS, save
It will create GitHub Pages automatically.