Slides (Presentations)

Create interactive presentations with Reveal.js

jet-w
6min

Slides (Presentations)

This blog integrates Reveal.js to let you create beautiful interactive presentations using Markdown.

Quick Start

Creating a Presentation

Create a Markdown file in the content/slides/ directory:

---
title: My Presentation
description: A demo presentation
pubDate: 2025-01-01
theme: black
---

# First Slide

This is the opening

---

## Second Slide

- Point one
- Point two
- Point three

---

# Thank You!

Slide Separators

  • Use --- (three dashes) to separate horizontal slides
  • Use ---- (four dashes) to separate vertical slides
# Topic One

---

# Topic Two

This is horizontal navigation

----

## Topic Two Details

This is a vertical sub-slide (press ↓)

----

## More Details

Continue vertical navigation

---

# Topic Three

Back to horizontal navigation

Frontmatter Configuration

OptionTypeDefaultDescription
titlestring-Presentation title (required)
descriptionstring-Presentation description
pubDateDate-Publication date
authorstring-Author
tagsstring[][]Tags
themestring”black”Theme name
transitionstring”slide”Transition animation
controlsbooleantrueShow control arrows
progressbooleantrueShow progress bar
slideNumberbooleanfalseShow slide numbers
draftbooleanfalseDraft status

Available Themes

ThemeDescription
blackBlack background, white text (default)
whiteWhite background, black text
leagueGray background
beigeBeige background, vintage style
nightNight mode, dark blue background
serifSerif fonts, academic style
simpleMinimalist white
solarizedSolarized color scheme

Transitions

TransitionDescription
noneNo animation
fadeFade in/out
slideSlide (default)
convexConvex effect
concaveConcave effect
zoomZoom effect

Writing Content

Titles and Text

# Main Title

## Section Title

Regular paragraph text

**Bold** and *italic*

> Blockquote

Lists

## Unordered List

- Item one
- Item two
- Item three

---

## Ordered List

1. First step
2. Second step
3. Third step

Code Highlighting

## Code Example

```javascript
function hello(name) {
  console.log(`Hello, ${name}!`);
}

hello('World');
```

Supports syntax highlighting for all common programming languages.

Math Formulas

LaTeX math formulas are supported:

## Math Formulas

Inline: $E = mc^2$

Block:

$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$

Mermaid Diagrams

## Flowchart

```mermaid
graph TD
    A[Start] --> B{Condition}
    B -->|Yes| C[Execute]
    B -->|No| D[Skip]
    C --> E[End]
    D --> E
```

Column Layout

## Two Columns

<div style="display: flex; gap: 2rem;">
<div style="flex: 1;">

### Left Side

- Content one
- Content two

</div>
<div style="flex: 1;">

### Right Side

- Content three
- Content four

</div>
</div>

Images

## Image Display

![Description](/images/example.png)

Tables

## Comparison

| Feature | Option A | Option B |
|:---|:---:|:---:|
| Performance | High | Medium |
| Usability | Medium | High |
| Cost | Low | Medium |

Fragment Animations

Use HTML attributes to add step-by-step reveal effects:

## Step by Step

<ul>
  <li class="fragment">Step one</li>
  <li class="fragment">Step two</li>
  <li class="fragment">Step three</li>
</ul>

Fragment Types

<p class="fragment fade-in">Fade in</p>
<p class="fragment fade-out">Fade out</p>
<p class="fragment highlight-red">Highlight red</p>
<p class="fragment highlight-blue">Highlight blue</p>
<p class="fragment grow">Grow</p>
<p class="fragment shrink">Shrink</p>

Keyboard Shortcuts

Available shortcuts in presentation mode:

ShortcutFunction
/ Horizontal navigation
/ Vertical navigation
SpaceNext slide
EscOverview mode
FFullscreen mode
SSpeaker view
BBlack screen pause
?Show help

Speaker View

Press S to open speaker view, which shows:

  • Current slide
  • Next slide preview
  • Speaker notes
  • Timer

Adding Speaker Notes

## Slide Title

Slide content

Note:
These are speaker notes that the audience won't see.
You can write prompts, key points, etc.

File Organization

Recommended directory structure:

content/
└── slides/
    ├── my-presentation.md     # Single presentation
    └── workshop/              # Series
        ├── 01-intro.md
        ├── 02-basics.md
        └── 03-advanced.md

Best Practices

Keep It Simple

Focus on one key point per slide. Avoid information overload.

Visual Hierarchy
  • Use headings to establish structure
  • Use lists and diagrams effectively
  • Leave appropriate whitespace
Code Presentation
  • Keep code snippets short
  • Highlight key parts
  • Add explanatory text
Performance
  • Optimize and compress images
  • Avoid extremely long presentations
  • Complex diagrams may need loading time

Example Presentations

Visit the /slides page to browse example presentations, including:

  • Basic syntax demo
  • Code highlighting examples
  • Math formula showcase
  • Mermaid diagrams
  • Theme previews

Next: Check out Icons for visual elements.