https://github.com/3mdeb/slidev-template
Base template repository for integration and development of slidev presentations
https://github.com/3mdeb/slidev-template
Last synced: 5 months ago
JSON representation
Base template repository for integration and development of slidev presentations
- Host: GitHub
- URL: https://github.com/3mdeb/slidev-template
- Owner: 3mdeb
- License: apache-2.0
- Created: 2025-04-11T15:21:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-17T18:10:45.000Z (7 months ago)
- Last Synced: 2025-11-17T20:17:52.323Z (7 months ago)
- Language: CSS
- Size: 1.02 MB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to [Slidev](https://github.com/slidevjs/slidev)!
## Preparation
This repository is supposed to be used as a submodule to repository with slides.
Minimal slides repository structure should look like this
```text
slides
├── slides.metadata
├── slides-template.md
└── slidev-template
```
With `slides.metadata` and `slides-template.md` copied from this repository.
`slides-template.md` is used by `render-slides.sh` and `gen_slides.sh` scripts
and needs to be modified before use. You need to, at minimum, replace ``.
There are 2 other variables, that are replaced dynamically by scripts:
- `` - replaced with first character in slide filename e.g. `1-slides.md`
would result in `` being replaced with `1`. You can remove line
containing this variable if you don't need it.
- `` - path to slide we are trying to render.
`slides.metadata` is a `yaml` file containing information needed for slides
generation and is needed by `gen_slides.sh` script.
Example:
```yml
slides:
- input_file: "path/to/slides.md"
range: "1-10"
output_file: "1.pdf"
- input_file: "path/to/presentation.md"
range: "3-"
output_file: "2.pdf"
```
- `input_file` - path to `.md` file you want to convert to PDF
- `range` - which pages to include. Leave empty to include all pages
- `output_file` - output PDF filename.
## Relative paths
Make sure to use relative paths in slides e.g. `../img/` instead of `/img` as
scripts run `slidev` from `slidev-template` directory.
## Local preview
Usage:
```sh
./slidev-template/scripts/render-slides.sh
```
Example:
```text
./slidev-template/scripts/render-slides.sh pages/presentation.md
(...)
●■▲
Slidev v52.0.0
theme ./theme
css engine unocss
entry /repo/slidev-template/slides.md
public slide show > http://localhost:8000/
presenter mode > http://localhost:8000/presenter/
slides overview > http://localhost:8000/overview/
export slides > http://localhost:8000/export/
remote control > http://172.17.0.3:8000/entry/
shortcuts > restart | open | edit | quit | qrcode
```
You can then open given links to e.g. preview your presentation.
You can override the default copyright string using an `COPYRIGHT`
environment variable:
```bash
COPYRIGHT="All Rights Reserved by 3mdeb Sp. z o.o." \
./slidev-template/scripts/render-slides.sh
```
Default copyright is `3mdeb Sp. z o.o. Licensed under the CC BY-SA 4.0`.
## Export presentation
To export slides to PDF use
```sh
./slidev-template/scripts/ci/gen_slides.sh
```
Generated slides will be in `slidev-template/output` directory.
You can override the default copyright string using an `COPYRIGHT`
environment variable:
```bash
COPYRIGHT="All Rights Reserved by 3mdeb Sp. z o.o." \
./slidev-template/scripts/ci/gen_slides.sh
```
Default copyright is `3mdeb Sp. z o.o. Licensed under the CC BY-SA 4.0`.