A custom slide generation system that separates content (Markdown) from templates (HTML structure), enabling easy content creation and template maintenance.
- Create your slides - Write Markdown files in the
slides/directory - Add images - Place image files in the
slides/media/directory - Build slides - Run
ruby build - View output - Open generated HTML files in
output/directory
Every slide is a Markdown file with YAML frontmatter:
---
template: content
---
# Your Slide Title
Your content goes here with **bold** and *italic* text.For hero/title slides:
---
template: frontpage
---
# Welcome to My Presentation
## Subtitle HereFor chapter dividers:
---
template: section-title
---
# Chapter 1
## Getting StartedFor main content slides:
---
template: content
---
# Slide Title
- Bullet point 1
- Bullet point 2
- Bullet point 3
Some paragraph text with **emphasis**.Put your image files in the slides/media/ directory:
slides/
1.md
2.md
media/
whale.png # Your image here
diagram.jpg # Another image
Use standard Markdown image syntax:
---
template: content
---
# My Slide with Image
Here's an important diagram:

And here's a fun whale:
media/filename (without leading slash) in your Markdown. Do NOT use /media/filename. The build process copies files from slides/media/ to output/media/ and converts paths automatically.
```ruby
def hello_world
puts "Hello, World!"
end
### Supported Languages
The system supports syntax highlighting for:
- Ruby
- JavaScript
- Python
- HTML
- CSS
- JSON
- And many more via Prism.js
### Example with Code
```markdown
---
template: content
---
# Ruby Example
Here's a simple Ruby method:
```ruby
class Presentation
def initialize(title)
@title = title
end
def display
puts "Presenting: #{@title}"
end
end
## File Naming and Organization
### Current Structure
Based on the actual project:
slides/ 1.md # Slides 2.md 2b.md 2c.md 3.md 4.md 4a.md 4b.md 4c.md 4d.md 6.md 6a.md 7.md 7a.md 7b.md 8.md media/ # Images and media directory whale.png cow.png pass.png works-on-my-machine.png no-moon.png haha.mp3
### Build Output
After running `ruby build`:
output/ 1.html 2.html 2b.html 2c.html 3.html 4.html 4a.html 4b.html 4c.html 4d.html 6.html 6a.html 7.html 7a.html 7b.html 8.html media/ whale.png cow.png pass.png works-on-my-machine.png no-moon.png haha.mp3
## Complete Examples
### Example 1: Welcome Slide
**File**: `slides/1.md`
```markdown
---
template: frontpage
---
# Building Better APIs
## A Developer's Guide to REST and GraphQL
File: slides/2.md
---
template: section-title
---
# REST Fundamentals
## Understanding HTTP and ResourcesFile: slides/3.md
---
template: content
---
# REST API Example
Here's a simple user endpoint:
```javascript
// GET /api/users/123
{
"id": 123,
"name": "John Doe",
"email": "john@example.com"
}Key benefits:
- Stateless - Each request contains all needed information
- Cacheable - Responses can be cached for performance
- Uniform Interface - Consistent patterns across endpoints
### Example 4: Image-Heavy Slide
**File**: `slides/4.md`
```markdown
---
template: content
---
# REST vs GraphQL
## REST Architecture

## GraphQL Architecture

## Performance Comparison

ruby build- Reads all
.mdfiles fromslides/directory - Parses YAML frontmatter and Markdown content
- Applies appropriate HTML template
- Renders Markdown to HTML with custom styling
- Copies images from
slides/media/tooutput/media/ - Generates final HTML files in
output/directory - Adds syntax highlighting and navigation
Open any .html file in output/ directory with your browser:
open output/1.html- Keep titles short and clear
- Use bullet points for key information
- Include one main concept per slide
- Add images to break up text-heavy slides
- ALWAYS use
media/filenamepath format (without leading slash) - Use descriptive alt text for accessibility
- Keep image file sizes reasonable (< 1MB)
- Use consistent image formats (PNG for graphics, JPG for photos)
- Supported formats: PNG, JPG, JPEG, GIF, SVG, WebP
- Audio files also supported: MP3, WAV, OGG, M4A, AAC
- Keep code blocks short and focused
- Add comments to explain complex parts
- Use proper indentation
- Test code examples before including them
- Use numbered or lettered prefixes for slide order (1.md, 2.md, 2b.md, etc.)
- Group related slides with consistent naming
- Create a slide outline before writing content
- Keep backup copies of important images
Images not showing:
- Check that image files are in
slides/media/directory - Verify image paths use
media/filenameformat in Markdown (NO leading slash) - Ensure image filenames match exactly (case-sensitive)
- Common mistake: using
/media/filenameinstead ofmedia/filename
Code not highlighting:
- Verify language name is correct after ```
- Check for unclosed code blocks
- Make sure there are no extra spaces
Template not applied:
- Check YAML frontmatter syntax
- Verify template name matches available templates
- Ensure YAML frontmatter is at the very top of file
If you encounter issues:
- Check that all
.mdfiles have proper YAML frontmatter - Verify image files exist in
slides/media/directory - Run
ruby buildand check for error messages - Compare your files with the examples in this manual
The system includes navigation between slides. Special slides like 2b.html are automatically included in navigation when they exist.
To modify templates, edit files in the templates/ directory:
templates/frontpage.erb- Hero slidestemplates/section-title.erb- Chapter dividerstemplates/content.erb- Main content slides
To rebuild all slides after template changes:
ruby buildTo compare generated slides with originals:
ruby compare_results.rb