Slides & code for my talks, using Slidev.
To add a new slide, follow these steps:
- Navigate to the
slides
directory and run the following command:
pnpm create slidev@latest
-
When prompted with
Install and start it now?
, answeryes
.This will automatically install dependencies and start the new Slidev project.
-
If you answer
yes
to the above question, you might see a warning:
will be removed and reinstalled from scratch. Proceed?
Answer yes
to this question as well.
-
If you answer
no
toInstall and start it now?
, you will need to install the dependencies manually.Move to the root directory and run:
pnpm i
To customize the build and export paths for the new slide, update the package.json
file in the newly created slide directory.
Replace xxx
with the project name you specified when running pnpm create slidev@latest
.
Example Update:
Before:
"scripts": {
"build": "slidev build",
"dev": "slidev --open",
"export": "slidev export"
}
After:
"scripts": {
"build": "slidev build --base /xxx/ --out ../../dist/xxx",
"dev": "slidev --open",
"export": "slidev export --output ../output/xxx.pdf",
"export:pptx": "slidev export --output ../output/xxx --format pptx"
}
xxx
in scripts: Replace this placeholder with the project name you provided during the setup process.- Output Directory: Exported files will be saved in the
output
directory by default, and built assets will go todist/xxx
.
For a more detailed explanation of how this repository is structured and set up, please refer to the Zenn Scrap below: