GitHub Pages Demo: https://huakunshen.github.io/slidev-monorepo/
Template for building and serving multiple slidev slides on a single website.
The template contains a website entrypoint written in vitepress in ./docs. You can add description and links for each slide.
Build all slides and a vitepress entrypoint, artifact will be produced at ./dist
.
bun run build
bun run preview
cd slides
bunx create-slidev # don't install dependency, dependencies for this monorepo will be managed by bun
Modify the build
script for each newly created slide like the following
slidev build --base /tutorial2/ --out ../../dist/tutorial2
Important
You will have to make changes to the base url config
The demo website is deployed to GitHub Pages at https://huakunshen.github.io/slidev-monorepo/
GitHub pages for a repo uses repo name as the base path, and can cause problems when deploying websites on it.
The base path for the demo website is /slidev-monorepo
. For your own deployment you will have to change it to your repo name.
If you want to deploy the site to the root of a domain (e.g. slides.example.com), you will also have to make changes to the base url config in a few places
- ./docs/.vitepress/config.ts
- The line
base: "/slidev-monorepo/",
will have to be changed tobase: "/",
or simply removed
- The line
- In
package.json
of each slide package, the base path in build script needs to be updatedslidev build --base /slidev-monorepo/slides/tutorial1/ --out ../../dist/slides/tutorial1 slidev build --base /slides/tutorial1/ --out ../../dist/slides/tutorial1