Skip to content

halqme/bundeck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

117 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bundeck 🐰

Zero-Config Slide Generator β€” Write Markdown, get beautiful HTML slides instantly.

Bundeck is a fast, zero-configuration presentation tool powered by Bun. It transforms your Markdown files into polished, responsive HTML slides with automatic layout adjustments.

πŸš€ Features

  • Markdown First: Write your content in standard Markdown.
  • Auto Layout: Automatically adjusts font sizes based on content density.
  • Fast Build: Powered by Bun for incredible speed.
  • Flexible Styling: Support for CSS classes, columns, and custom attributes.
  • Live Preview: Built-in development server with live reload.
  • Presenter Mode: Full-featured presenter dashboard with slide notes, timer, laser pointer, and sync across devices.
  • Context Menu: Right-click on slides for quick navigation (first/last slide, go to slide number, open presenter mode).
  • Hover Navigation: Floating prev/next buttons appear on hover at the bottom-right corner.
  • Zero Config: Sensible defaults, just write and run.

πŸ“¦ Installation

Using Bun

bun add -d bundeck

Or run directly:

bunx bundeck <your-file.md>

Using npm

Although this tool is built for Bun, you can install it via npm if you have the Bun runtime available in your path.

npm install -g bundeck
# or run directly
npx bundeck <your-file.md>

Note: Requires Bun runtime installed on your system.

Using Nix

This project provides a standard Nix flake.

# Run directly
nix run github:halqme/bundeck -- <your-file.md>

# Enter development shell
nix develop github:halqme/bundeck

πŸ›  Usage

Build Slides

Generate a static HTML file from your Markdown source.

bundeck presentation.md

Options:

  • -o, --output <path>: Specify output file path (default: dist/index.html)
  • -w, --watch: Watch for changes and rebuild
  • --open: Open the generated file in browser
  • -v, --version: Show version number
  • -h, --help: Show help message

Development Server

Start a local server to preview your slides.

bundeck serve presentation.md

Options:

  • -p, --port <number>: Set server port (default: 3000)

Presenter Mode

Start the server and open http://localhost:3000/presenter in your browser to access the presenter dashboard.

Features available in presenter mode:

  • Slide preview β€” Current slide and next slide shown side-by-side
  • Speaker notes β€” Notes from ::: speaker blocks displayed alongside slides
  • Laser pointer β€” Click the πŸ”΄ button or press a key to activate; mouse movement is synced to the audience view in real-time
  • Timer β€” Track elapsed time with pause/reset controls
  • Progress bar β€” Visual indicator of presentation progress
  • Open view mode β€” Click the β†— button to open a new tab with the audience view, synced via BroadcastChannel

View Mode UI

Both the static build and server mode include in-viewport navigation:

  • Hover navigation β€” Move the mouse to the bottom-right corner to reveal β€Ή and β€Ί buttons
  • Context menu β€” Right-click anywhere on a slide to access:
    • Navigate to first / previous / next / last slide
    • Jump to a specific slide number
    • Open presenter mode in a new tab (server mode only)

πŸ“ Markdown Syntax

Bundeck extends standard Markdown with powerful layout features.

Frontmatter

Configure your slide deck using YAML frontmatter at the top of your file.

title: My Awesome Presentation
author: Me
theme: default
aspectRatio: 16:9
fontSize: M

Slides

Separate slides with ---.

# Slide 1

Content...

---

# Slide 2

Content...

Columns

Create multi-column layouts using ::: columns blocks.

::: columns
:::: col

### Left Column

- Item 1
- Item 2
  ::::

:::: col

### Right Column

![Image](image.png)
::::
:::

Styling & Classes

Apply CSS classes to elements using {.classname} syntax.

# Centered Title {.center}

This text is highlighted. [Important]{.mark}

![Background](bg.jpg){.cover}

Speaker Notes

Add private notes that won't appear on the main slide.

::: speaker
Don't forget to mention the new features!
:::

πŸ’» Development

Prerequisites

  • Bun (v1.3.8+)
  • Nix (optional, for reproducible environment)

Setup

  1. Clone the repository:

    git clone https://github.com/halqme/bundeck.git
    cd bundeck
  2. Install dependencies:

    bun install
  3. Run tests:

    bun run test
  4. Build the project:

    bun run build

πŸ“„ API Documentation

For detailed API reference, see API.md.

Programmatic Usage

import { generateSlides, parseSlides } from "bundeck";

// εŸΊζœ¬ηš„γͺ使用
const markdown = `# Title\n\n---\n\n# Slide 2`;
const html = await generateSlides(markdown);

// γ‚ͺγƒ—γ‚·γƒ§γƒ³δ»˜γ
const html = await generateSlides(markdown, {
  title: "My Presentation",
  theme: "dark",
  outputPath: "output.html",
});

Performance

Bundeck is optimized for speed:

Scenario Time
5,000 char Markdown (5 slides) < 100ms
15,000 char Markdown (10 slides) < 500ms
50 slides < 1s

πŸ“ Project Structure

bundeck/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ cli/              # CLI tools
β”‚   β”œβ”€β”€ core/             # Core parsing and render logic
β”‚   β”‚   β”œβ”€β”€ parser.ts     # Markdown β†’ token stream (via marked)
β”‚   β”‚   β”œβ”€β”€ splitter.ts   # Tokens β†’ Slide[]
β”‚   β”‚   └── extensions/   # Custom markdown syntax
β”‚   β”œβ”€β”€ client/           # Browser runtime
β”‚   β”‚   β”œβ”€β”€ runtime-view.ts      # View mode entry (static build)
β”‚   β”‚   β”œβ”€β”€ runtime-server.ts    # Server entry (view + presenter)
β”‚   β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”‚   β”œβ”€β”€ navigator.ts     # Slide transitions & text scaling
β”‚   β”‚   β”‚   β”œβ”€β”€ runtime-core.ts  # Shared view runtime setup
β”‚   β”‚   β”‚   β”œβ”€β”€ view-ui.ts       # Hover nav buttons & context menu
β”‚   β”‚   β”‚   β”œβ”€β”€ geometry.ts      # Aspect-ratio & coordinate math
β”‚   β”‚   β”‚   └── types.ts         # Navigator options
β”‚   β”‚   └── presenter/           # Presenter dashboard UI
β”‚   β”œβ”€β”€ server/           # Development server
β”‚   β”œβ”€β”€ template/         # HTML template & CSS bundling
β”‚   └── types/            # Shared TypeScript types
β”œβ”€β”€ tests/                # Test suites
β”œβ”€β”€ styles/               # CSS themes
└── examples/             # Example presentations

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

πŸ“„ License

MIT


Built with ❀️ using Bun.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors