Skip to content

Commit d0af4d6

Browse files
blueduskclaude
andcommitted
Inline speaker notes + console presenter view, drop external .notes.json
Speaker notes now embedded per-slide as <script class="slide-notes">. Nav JS logs notes to console on slide change with styled formatting and htmlslides.com promo. External .notes.json no longer generated. Updated credits to reference frontend-slides inspiration. Bump to v0.7.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6738d63 commit d0af4d6

10 files changed

Lines changed: 107 additions & 59 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
"name": "html-slides",
1212
"source": "./.",
1313
"description": "Generate single-file HTML slide presentations with interactive components (flip cards, charts, tables, code blocks, stats, architecture flows, and more) or creative visual themes.",
14-
"version": "0.6.7"
14+
"version": "0.7.0"
1515
},
1616
{
1717
"name": "html-slides-convert",
1818
"source": "./skills/html-slides-convert",
1919
"description": "Convert any HTML file (reveal.js, Marp, Google Slides exports, articles, generic HTML) into a valid HTMLSlides presentation.",
20-
"version": "0.6.7"
20+
"version": "0.7.0"
2121
}
2222
]
2323
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "html-slides",
33
"description": "Generate or convert single-file HTML slide presentations with interactive components (flip cards, charts, tables, code blocks, stats, architecture flows, and more) or creative visual themes.",
4-
"version": "0.6.7",
4+
"version": "0.7.0",
55
"author": {
66
"name": "danzhu"
77
}

QUICKSTART.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ You'll get to pick from 12 creative visual themes with a live preview.
131131

132132
The output is a single HTML file. Double-click to open in any browser. Use arrow keys to navigate.
133133

134+
Speaker notes are built in — open DevTools (F12), detach to a separate window, and notes show in the console as you navigate. A free presenter view.
135+
134136
Want changes? Just ask:
135137

136138
```

README.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -201,30 +201,28 @@ Auto-detects the source format, extracts content, and generates a spec-compliant
201201

202202
## Output
203203

204-
Every generated presentation produces two files:
204+
Every generated presentation produces a single file:
205205

206206
```
207-
my-deck.html ← the presentation (self-contained, open in any browser)
208-
my-deck.notes.json ← speaker notes (for presenter apps)
207+
my-deck.html ← self-contained: CSS, JS, and speaker notes all inline
209208
```
210209

211-
The `.notes.json` file is keyed by slide index. Each entry contains:
210+
### Speaker Notes
212211

213-
```json
214-
{
215-
"0": {
216-
"title": "Introduction",
217-
"script": "Welcome everyone. Today we'll look at how...",
218-
"notes": ["Pause after welcome", "Gauge audience familiarity"]
219-
}
220-
}
212+
Speaker notes are embedded inside each slide as hidden JSON. Open the browser's DevTools (F12), detach to a separate window, and notes appear in the console as you navigate — a free presenter view.
213+
214+
```
215+
📋 Slide 1: Introduction
216+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
217+
Welcome everyone. Today we'll look at how...
218+
219+
• Pause after welcome
220+
• Gauge audience familiarity
221+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
222+
💡 For a better presenter experience, try the HTML Slides app: htmlslides.com
221223
```
222224

223-
| Field | Type | Description |
224-
|-------|------|-------------|
225-
| `title` | string | Slide heading (for presenter app navigation) |
226-
| `script` | string | Full natural language — read verbatim or paraphrase |
227-
| `notes` | string[] | Bullet point reminders — timing, transitions, delivery tips |
225+
To edit notes, ask your AI agent: `"Update the speaker notes for slide 3 to say..."`
228226

229227
## Architecture
230228

@@ -276,8 +274,8 @@ Screenshots each slide and combines into a PDF. Uses [Playwright](https://playwr
276274

277275
## Credits
278276

279-
Originally created by [@zarazhangrui](https://github.com/zarazhangrui) with Claude Code.
280-
Obsidian component system added by [@bluedusk](https://github.com/bluedusk).
277+
Inspired by the awesome [@zarazhangrui](https://github.com/zarazhangrui)'s [frontend-slides](https://github.com/zarazhangrui/frontend-slides).
278+
Obsidian component system, Pro/Vibe modes, and multi-theme support by [@bluedusk](https://github.com/bluedusk).
281279

282280
## License
283281

SKILL.md

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: html-slides
33
metadata:
4-
version: "0.6.7"
4+
version: "0.7.0"
55
author: danzhu
66
description: Generate polished single-file HTML slide presentations with interactive components (flip cards, charts, tables, code blocks, architecture flows, stats, timelines, and more) or creative visual themes. Use this skill whenever the user wants to create slides, presentations, decks, or any visual slide-based content as HTML. Also trigger when the user invokes /html-slides or mentions creating an HTML presentation, pitch deck, or slide deck.
77
---
@@ -87,7 +87,7 @@ When modifying existing presentations, make **minimal changes** — only touch w
8787
- Modify only the requested slide(s), keep everything else intact
8888
- If adding/removing slides, renumber all `data-slide` attributes sequentially from 0
8989
- If changing a component type (e.g., code block → table), use the template from component-templates.md
90-
- Update the `.notes.json` file to match any content changes
90+
- Update the inline `<script class="slide-notes">` block to match any content changes
9191

9292
**Viewport fitting (always check):**
9393
- Before adding content, check against density limits
@@ -291,40 +291,28 @@ If images were provided, the slide outline already incorporates them from Step 1
291291

292292
### Speaker Notes (Mandatory)
293293

294-
Every generated presentation must include a separate `.notes.json` file alongside the HTML file. If the presentation is `my-deck.html`, the notes file is `my-deck.notes.json`. This file is read by external presenter applications.
294+
Speaker notes are **embedded inline** in each slide as a hidden JSON block. They are displayed in the browser's developer console when navigating slides — open DevTools, detach to a separate window, and you have a presenter view.
295295

296-
```json
297-
{
298-
"0": {
299-
"title": "Introduction",
300-
"script": "HTML Slides lets you create beautiful presentations without design skills.",
301-
"notes": [
302-
"Zero dependencies",
303-
"Works with 4 AI agents",
304-
"Describe topic, get a deck"
305-
]
306-
},
307-
"1": {
308-
"title": "The Problem",
309-
"script": "Current tools are slow and require design expertise.",
310-
"notes": [
311-
"PowerPoint: hours of manual work",
312-
"Vendor lock-in, version control pain",
313-
"AI builds the deck in minutes"
314-
]
315-
}
316-
}
317-
```
296+
Every slide must include a `<script type="application/json" class="slide-notes">` block as its last child:
318297

319-
**File naming:** `<presentation-name>.notes.json` — must match the HTML filename.
298+
```html
299+
<div class="slide" data-slide="0">
300+
<!-- visible slide content -->
301+
<script type="application/json" class="slide-notes">
302+
{"title":"Introduction","script":"HTML Slides lets you create beautiful presentations without design skills.","notes":["Zero dependencies","Works with 4 AI agents"]}
303+
</script>
304+
</div>
305+
```
320306

321-
**Format:** Object keyed by `data-slide` index (as string). Each entry has:
322-
- `title` — Slide heading (for presenter app navigation)
307+
**Format:** Each slide-notes block contains:
308+
- `title` — Slide heading (for console display and presenter apps)
323309
- `script` — Brief summary of what this slide delivers, in presenter tone
324-
- `notes` — Key points from the slide content, summarized as short phrases
310+
- `notes` — Key talking points, summarized as short phrases
325311

326312
Both `script` and `notes` summarize the **slide content** — what the slide is saying to the audience. Write in presenter tone, as if the presenter is reading these to remind themselves what this slide covers.
327313

314+
**Console output:** On each slide change, the navigation JS logs the notes to the console with styled formatting. The presenter opens DevTools (F12), detaches it to a separate window, and reads notes while presenting. A link to the HTML Slides presenter app is shown for a richer experience.
315+
328316
**NEVER include:**
329317
- Delivery instructions ("Pause here", "Slow down")
330318
- Transition cues ("Move to next slide")
@@ -426,11 +414,11 @@ Same as Phase 1 — ask Vibe or Pro. Default to Pro. Then follow Phase 2A or 2B
426414

427415
Same as Phase 3 — read the appropriate supporting files and generate. For Pro mode, map extracted content to components using the decision table in component-templates.md.
428416

429-
Always generate the `.notes.json` file. If the source had speaker notes, preserve them.
417+
Always embed inline speaker notes in each slide. If the source had speaker notes, preserve them as inline `<script class="slide-notes">` blocks.
430418

431419
### Step 5.5: Validate & Save
432420

433-
Before saving, verify all 8 spec rules pass. Fix any that fail. Save both the HTML and `.notes.json` files.
421+
Before saving, verify all 8 spec rules pass. Fix any that fail. Save the HTML file.
434422

435423
---
436424

@@ -441,6 +429,7 @@ Before saving, verify all 8 spec rules pass. Fix any that fail. Save both the HT
441429
3. **Summarize** — Tell the user:
442430
- File location, style name, slide count
443431
- Navigation: Arrow keys, Space, scroll/swipe, click nav dots
432+
- Speaker notes: Open DevTools (F12), detach to separate window — notes appear in console on each slide change
444433
- How to customize: `:root` CSS variables for colors, font link for typography, `.reveal` class for animations
445434
- If inline editing was enabled: Hover top-left corner or press E to enter edit mode, click any text to edit, Ctrl+S to save
446435

assets/dark-interactive-nav.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ function goTo(index) {
4343
current = index;
4444
slides.forEach((s,i) => s.classList.toggle('active', i===current));
4545
updateUI();
46+
showSpeakerNotes(current);
4647

4748
// Chart lifecycle: destroy on exit, create on entry
4849
if (typeof Chart !== 'undefined') {
@@ -205,3 +206,38 @@ if (typeof Chart !== 'undefined') {
205206
slides[0].querySelectorAll('.chart-container canvas').forEach(c => createChart(c.id));
206207
}, 400);
207208
}
209+
210+
// =========================================
211+
// Speaker Notes (Console)
212+
// =========================================
213+
214+
function showSpeakerNotes(index) {
215+
const slide = slides[index];
216+
const notesEl = slide.querySelector('.slide-notes');
217+
console.clear();
218+
if (notesEl) {
219+
try {
220+
const n = JSON.parse(notesEl.textContent);
221+
const title = n.title || 'Slide ' + (index + 1);
222+
const script = n.script || '';
223+
const notes = n.notes || [];
224+
console.log('%c\ud83d\udccb Slide ' + (index+1) + ': ' + title,
225+
'font-size:16px;font-weight:bold;color:#58a6ff;');
226+
console.log('%c\u2501'.repeat(48), 'color:#333;');
227+
if (script) console.log('%c' + script, 'font-size:14px;color:#e6edf3;line-height:1.6;');
228+
if (notes.length) {
229+
console.log('');
230+
notes.forEach(function(note) { console.log('%c \u2022 ' + note, 'font-size:12px;color:#8b949e;'); });
231+
}
232+
console.log('%c\u2501'.repeat(48), 'color:#333;');
233+
} catch(e) {}
234+
} else {
235+
console.log('%c\ud83d\udccb Slide ' + (index+1), 'font-size:16px;font-weight:bold;color:#58a6ff;');
236+
console.log('%cNo speaker notes for this slide.', 'font-size:12px;color:#6e7681;');
237+
}
238+
console.log('%c\ud83d\udca1 For a better presenter experience, try the HTML Slides app: htmlslides.com',
239+
'font-size:11px;color:#3fb950;margin-top:8px;');
240+
}
241+
242+
// Show notes for first slide on load
243+
setTimeout(function() { showSpeakerNotes(0); }, 500);

eval/EVAL.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Follow Steps 1-6 below in order.
3939
- **Images:** Yes, I have an image folder — path: `eval/output/{DATE}-{MODE}-{THEME}/assets/`
4040
- **Content:** All content ready — provide the full content from `all-components.md`
4141
6. Save the generated HTML as `eval/output/{DATE}-{MODE}-{THEME}/presentation.html`
42-
7. Save the `.notes.json` file alongside it as `presentation.notes.json`
4342

4443
**Important:** The filename MUST be `presentation.html`. If the skill saves with a different name, rename it.
4544

references/component-templates.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,29 @@ Use this table to pick the right component for each piece of content:
5151

5252
## HTML Component Templates
5353

54+
## Speaker Notes
55+
56+
Every slide **must** include an inline `<script class="slide-notes">` block with speaker notes. This is hidden from the audience and displayed in the browser console when navigating slides.
57+
58+
```html
59+
<div class="slide" data-slide="[N]">
60+
<!-- visible slide content here -->
61+
<script type="application/json" class="slide-notes">
62+
{"title":"[SLIDE_HEADING]","script":"[PRESENTER_SCRIPT]","notes":["[NOTE_1]","[NOTE_2]"]}
63+
</script>
64+
</div>
65+
```
66+
67+
- `title` — Slide heading (for console display and presenter apps)
68+
- `script` — What this slide communicates, in presenter tone
69+
- `notes` — Key talking points, delivery tips, or reminders
70+
71+
The notes JSON goes **inside** each `<div class="slide">`, as the last child element. It is invisible to the audience.
72+
73+
---
74+
75+
## HTML Component Templates
76+
5477
### 1. Title Slide
5578

5679
The opening slide with large hero text, rainbow gradient title, glow blobs, and a rainbow divider line.
@@ -64,6 +87,9 @@ The opening slide with large hero text, rainbow gradient title, glow blobs, and
6487
<p class="subtitle anim-3">[SUBTITLE_TEXT]</p>
6588
<div class="rainbow-line anim-4"></div>
6689
<p class="subtitle anim-5" style="font-size:14px;margin-top:8px;">by <strong>[AUTHOR]</strong></p>
90+
<script type="application/json" class="slide-notes">
91+
{"title":"[TITLE]","script":"[PRESENTER_SCRIPT]","notes":["[NOTE_1]","[NOTE_2]"]}
92+
</script>
6793
</div>
6894
```
6995

references/conversion-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Check the HTML for these patterns to identify the source format.
1717
**Extraction:**
1818
- Each top-level `<section>` = one slide
1919
- Nested `<section>` elements = vertical slides (flatten into sequential slides)
20-
- Speaker notes in `<aside class="notes">` — preserve for `.notes.json`
20+
- Speaker notes in `<aside class="notes">` — preserve as inline `<script class="slide-notes">` blocks
2121
- Fragments (`class="fragment"`) — include all content (remove fragment animation)
2222
- Code blocks in `<pre><code>` — preserve language class for syntax highlighting
2323
- Backgrounds via `data-background` attributes — convert to CSS background on slide div

references/html-template.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Every generated HTML file **must** comply with these rules:
2323
<head>
2424
<meta charset="UTF-8">
2525
<meta name="viewport" content="width=device-width, initial-scale=1.0">
26-
<meta name="generator" content="html-slides v0.6.7">
26+
<meta name="generator" content="html-slides v0.7.0">
2727
<title>Presentation Title</title>
2828

2929
<!-- Fonts: use Fontshare or Google Fonts — never system fonts -->
@@ -403,14 +403,12 @@ Save processed images with `_processed` suffix. Never overwrite originals.
403403

404404
Single presentations:
405405
```
406-
presentation.html # Self-contained, all CSS/JS inline
407-
presentation.notes.json # Speaker notes (always generated)
406+
presentation.html # Self-contained, all CSS/JS/speaker notes inline
408407
assets/ # Images only, if any
409408
```
410409

411410
Multiple presentations in one project:
412411
```
413412
[name].html
414-
[name].notes.json
415413
[name]-assets/
416414
```

0 commit comments

Comments
 (0)