This project is a template for Slidev presentations recommended for use at Espressif.
You can jump to:
The template is based on the Slidev Getting Started project with the following changes:
- Theme: instead of
seriph
, it uses thedefault
theme. - Addons: it includes
- Layout: Espressif logo added.
- Slide content:
- Replaced Slidev Getting Started title page with a usual Espressif title page
- Changed guidelines in Themes
- Added a slide Asciinema describing this plugin
- Added a slide Poll and Quiz describing this plugin
You can use your OS native package manager to install the dependencies, however, it is recommended to use nvm
-- Node.js version manager.
The following instructions are provided in detail, as parts of the Node.js ecosystem may not be immediately intuitive to some users. These steps have been tested on Linux only. The general approach should be similar on other operating systems with some possible adjustments.
If you run into major problems installing and configuring the dependencies, feel free to open an issue — we’ll do our best to update the instructions accordingly.
Slidev requires Node.js
, which can be conveniently installed using nvm:
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.nvm/nvm.sh
# Install Node.js (LTS version includes npm)
nvm install --lts
To create your presentation:
- On the GitHub repo page, click Use this template in the top-right corner.
- This creates a new repo under your GitHub account with the contents of
slidev-esp-template
.
- This creates a new repo under your GitHub account with the contents of
- Clone your new repo:
git clone https://github.com/YOUR_USERNAME/slidev-esp-template.git cd ~/path/to/slidev-esp-template/
- Install project dependencies:
npm install
- (Optional but recommended) Set up your environment to use Slidev globally:
💡 If you prefer not to install anything globally, you can run Slidev using
# Install pnpm globally (recommended over npm for faster installs and disk efficiency) npm install -g pnpm # Create a global bin directory and add it to your shell's PATH pnpm setup # Restart your shell # Install the Slidev CLI globally pnpm add -g @slidev/cli
npm run dev
.
To start the slide show:
- Run
slidev
- Visit http://localhost:3030
Edit the slides.md to see the changes.
During your talk, you can:
- Use a websocket in the LAN by running
slidev --remote=<password> --host=0.0.0.0
OR - Use a workflow to build and Deploy Slidev to GitHub Pages
- Espressif:
- Slidev Showcases
To get started, see:
This is part of extensive Slidev documentation.
The most basic and important features:
- VS Code extension: If you use VS Code, you can install Slidev for VS Code extension to improve your experience using Slidev.
- Include static files: If you have static files, such as images or diagrams, place them in the
public/
folder. You can then reference them usingsrc="/image.png"
. For example, to include the imagepublic/myimage.jpeg
on your slide, usesrc="/myimage.png"
. - Embed external code blocks: If you need to include code blocks, place files containing code in the
snippets/
folder. Then:- Mark the regions to include:
// #region snippet ... // #endregion snippet
- Include the regions:
<<< @/snippets/external.ts#snippet
- Mark the regions to include:
- Arrange content in slides: You can save time arranging content in your slides using preset layouts in your slide frontmatter:
--- layout: two-cols ---
- Simplify content reuse: If you plan to reuse certain slides or sections in other Slidev presentations, you can place this content in separate markdown files inside the
pages/
folder, for examplepages/content.md
. To include them into your mainslides.md
, use:The parameter--- src: ./pages/content.md hide: false ---
hide
conveniently helps to show or hide the included slides. - Create tree diagrams: Though not a Slidev feature, the tool tree.nathanfriend.com can be very helpful in visualizing folder trees, decision trees, etc., in your slides:
📂 my-project/ ├── 📝 README.md └── 📁 files/
- Create diagrams as code: Slidev supports the following tools
- Use TailwindCSS for advanced formatting: TailwindCSS is already used in Vite (upon which Slidev is built). It can help create more advanced layouts, e.g., columns or grid.
You can create an Asciinema cast following the Getting Started guide.
The asciinema player's options can be included via :playerProps
:
<Asciinema src="casts/demo.cast" :playerProps="{speed: 2, rows: 13}"/>
See a usage example in slides.md > Asciinema.
By default, the header of the generated .cast
file embeds the width
and height
parameters:
{"version": 2, "width": 130, "height": 24, "timestamp": 1710834119, <...>}
When you hit the play button, the presence of width
and height
can result in unnecessary window resizing. To avoid window resizing, remove these parameters:
{"version": 2, "timestamp": 1710834119, <...>}
To enable slide syncing, run:
slidev --remote=<password>
This command will return the links for the presenter and attendees.
If slide syncing doesn't work, make sure that:
- The dev server (
slidev --remote
) is running somewhere (usually the presenter's device). - The presenter is using the presenter link.
- The presenter's and attendee's devices are connected to the same network.
- The device's OS does not block access to the LAN due to the use of VPN clients, etc.
See a usage example in slides.md > Poll and Quiz.
- Page numbers: To add page numbers, open the global-bottom.vue file and uncomment its contents.
- Color scheme: To change the color scheme, in the
slides.md
YAML frontmatter, update the parametercolorSchema
. The default value islight
, but you can update it toauto
ordark
. - Aspect ratio and canvas size: To change the configuration, in the
slides.md
YAML frontmatter, update the values ofaspectRatio
andcanvasWidth
.
If the slides are for an event that has its own logo (for example, DevCon25), consider replacing the standard Espressif logo with the event-specific logo.
To update the logo, follow these steps:
- Choose the logo in the
public/
folder. If your event's logo is not there, add it and consider adding it to the upstream template repo as well. - In the
slides.md
YAML frontmatter, find the parameterfavicon
and add the path to the new logo. - Preview the slides to make sure the logo is clearly visible and works well with the slide background color.