mdeck 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/CHANGELOG.md +259 -0
  2. package/LICENSE +21 -0
  3. package/README.md +156 -0
  4. package/assets/base.css +196 -0
  5. package/assets/extensions/layouts/chapter/extension.toml +26 -0
  6. package/assets/extensions/layouts/chapter/layout.jsx +21 -0
  7. package/assets/extensions/layouts/chapter/starter.md +8 -0
  8. package/assets/extensions/layouts/focus/extension.toml +8 -0
  9. package/assets/extensions/layouts/focus/layout.jsx +10 -0
  10. package/assets/extensions/layouts/focus/starter.md +4 -0
  11. package/assets/extensions/layouts/full-bleed-image/extension.toml +31 -0
  12. package/assets/extensions/layouts/full-bleed-image/layout.jsx +19 -0
  13. package/assets/extensions/layouts/full-bleed-image/starter.md +6 -0
  14. package/assets/extensions/layouts/generic/extension.toml +8 -0
  15. package/assets/extensions/layouts/generic/layout.jsx +8 -0
  16. package/assets/extensions/layouts/generic/starter.md +4 -0
  17. package/assets/extensions/layouts/image-text/extension.toml +25 -0
  18. package/assets/extensions/layouts/image-text/layout.jsx +17 -0
  19. package/assets/extensions/layouts/image-text/starter.md +6 -0
  20. package/assets/extensions/layouts/split/extension.toml +25 -0
  21. package/assets/extensions/layouts/split/layout.jsx +19 -0
  22. package/assets/extensions/layouts/split/starter.md +14 -0
  23. package/assets/extensions/layouts/title/extension.toml +26 -0
  24. package/assets/extensions/layouts/title/layout.jsx +14 -0
  25. package/assets/extensions/layouts/title/starter.md +5 -0
  26. package/assets/extensions/palettes/brand/extension.toml +29 -0
  27. package/assets/extensions/palettes/cobalt/extension.toml +27 -0
  28. package/assets/extensions/palettes/ember/extension.toml +27 -0
  29. package/assets/extensions/palettes/forest/extension.toml +27 -0
  30. package/assets/extensions/palettes/graphite/extension.toml +27 -0
  31. package/assets/extensions/palettes/lagoon/extension.toml +27 -0
  32. package/assets/extensions/palettes/neon/extension.toml +27 -0
  33. package/assets/extensions/palettes/nordic/extension.toml +27 -0
  34. package/assets/extensions/palettes/pastel/extension.toml +30 -0
  35. package/assets/extensions/palettes/phosphor/extension.toml +27 -0
  36. package/assets/extensions/palettes/swiss/extension.toml +27 -0
  37. package/assets/extensions/palettes/terra/extension.toml +27 -0
  38. package/assets/extensions/themes/academic/extension.toml +53 -0
  39. package/assets/extensions/themes/academic/styles.css +631 -0
  40. package/assets/extensions/themes/aurora/extension.toml +37 -0
  41. package/assets/extensions/themes/aurora/styles.css +644 -0
  42. package/assets/extensions/themes/duet/extension.toml +46 -0
  43. package/assets/extensions/themes/duet/styles.css +573 -0
  44. package/assets/extensions/themes/editorial/extension.toml +46 -0
  45. package/assets/extensions/themes/editorial/styles.css +574 -0
  46. package/assets/extensions/themes/fhnw/extension.toml +61 -0
  47. package/assets/extensions/themes/fhnw/styles.css +604 -0
  48. package/assets/extensions/themes/neue/extension.toml +46 -0
  49. package/assets/extensions/themes/neue/styles.css +489 -0
  50. package/assets/extensions/themes/sketch/extension.toml +48 -0
  51. package/assets/extensions/themes/sketch/styles.css +633 -0
  52. package/assets/extensions/themes/terminal/extension.toml +38 -0
  53. package/assets/extensions/themes/terminal/styles.css +550 -0
  54. package/assets/logo/avatar.png +0 -0
  55. package/assets/logo/logo-dark.svg +10 -0
  56. package/assets/logo/logo-light.svg +10 -0
  57. package/assets/logo/mark.svg +15 -0
  58. package/bin/mdeck.js +2 -0
  59. package/docs/README.md +8 -0
  60. package/docs/reference/authoring.md +795 -0
  61. package/docs/reference/claude-skill.md +96 -0
  62. package/docs/reference/extensions.md +250 -0
  63. package/docs/reference/layouts.md +153 -0
  64. package/docs/reference/palettes.md +106 -0
  65. package/docs/reference/structured-slides.md +120 -0
  66. package/docs/reference/themes.md +133 -0
  67. package/docs/site/assets/favicon.svg +15 -0
  68. package/docs/site/assets/github-logo.svg +1 -0
  69. package/docs/site/assets/site.css +162 -0
  70. package/docs/site/assets/site.js +123 -0
  71. package/docs/site/build.js +148 -0
  72. package/docs/site/content/appearance.md +203 -0
  73. package/docs/site/content/audience.md +178 -0
  74. package/docs/site/content/commands.md +153 -0
  75. package/docs/site/content/components.md +134 -0
  76. package/docs/site/content/drawing.md +72 -0
  77. package/docs/site/content/editing.md +59 -0
  78. package/docs/site/content/getting-started.md +103 -0
  79. package/docs/site/content/layouts.md +126 -0
  80. package/docs/site/content/media.md +107 -0
  81. package/docs/site/content/more-content.md +130 -0
  82. package/docs/site/content/presenting.md +93 -0
  83. package/docs/site/content/reusable-layouts.md +74 -0
  84. package/docs/site/content/sharing.md +88 -0
  85. package/docs/site/content/theme-authoring.md +144 -0
  86. package/docs/site/content/theme-repository.md +76 -0
  87. package/docs/site/content/troubleshooting.md +92 -0
  88. package/docs/site/content/views.md +56 -0
  89. package/docs/site/content/welcome.md +71 -0
  90. package/docs/site/content/writing.md +121 -0
  91. package/docs/site/examples/first-talk.md +88 -0
  92. package/docs/site/examples/notebook.svg +58 -0
  93. package/docs/site/images/themes/academic-dark.webp +0 -0
  94. package/docs/site/images/themes/academic-light.webp +0 -0
  95. package/docs/site/images/themes/academic.webp +0 -0
  96. package/docs/site/images/themes/aurora-dark.webp +0 -0
  97. package/docs/site/images/themes/aurora-light.webp +0 -0
  98. package/docs/site/images/themes/aurora.webp +0 -0
  99. package/docs/site/images/themes/duet-dark.webp +0 -0
  100. package/docs/site/images/themes/duet-light.webp +0 -0
  101. package/docs/site/images/themes/duet.webp +0 -0
  102. package/docs/site/images/themes/editorial-dark.webp +0 -0
  103. package/docs/site/images/themes/editorial-light.webp +0 -0
  104. package/docs/site/images/themes/editorial.webp +0 -0
  105. package/docs/site/images/themes/fhnw.webp +0 -0
  106. package/docs/site/images/themes/neue-dark.webp +0 -0
  107. package/docs/site/images/themes/neue-light.webp +0 -0
  108. package/docs/site/images/themes/neue.webp +0 -0
  109. package/docs/site/images/themes/sketch-dark.webp +0 -0
  110. package/docs/site/images/themes/sketch-light.webp +0 -0
  111. package/docs/site/images/themes/sketch.webp +0 -0
  112. package/docs/site/images/themes/terminal-dark.webp +0 -0
  113. package/docs/site/images/themes/terminal-light.webp +0 -0
  114. package/docs/site/images/themes/terminal.webp +0 -0
  115. package/docs/site/package.json +9 -0
  116. package/docs/site/pages.js +27 -0
  117. package/docs/site/server.js +58 -0
  118. package/examples/custom-layouts/extensions/comparison/extension.toml +35 -0
  119. package/examples/custom-layouts/extensions/comparison/layout.jsx +15 -0
  120. package/examples/custom-layouts/extensions/comparison/starter.md +17 -0
  121. package/examples/custom-layouts/extensions/comparison/styles.css +4 -0
  122. package/examples/custom-layouts/slides.md +60 -0
  123. package/examples/poll/slides.md +127 -0
  124. package/examples/python/.mdeck-backups/slides.drawings-2026-10-06T08-36-47Z.json +19 -0
  125. package/examples/python/.mdeck-backups/slides.drawings-2026-10-06T11-27-30Z.json +6 -0
  126. package/examples/python/slides.drawings.json +6 -0
  127. package/examples/python/slides.md +493 -0
  128. package/examples/showcase/.mdeck-backups/slides.drawings-2026-10-06T08-08-30Z.json +10 -0
  129. package/examples/showcase/.mdeck-backups/slides.drawings-2026-10-06T11-41-35Z.json +13 -0
  130. package/examples/showcase/img/image.jpg +0 -0
  131. package/examples/showcase/img/mdeck.svg +66 -0
  132. package/examples/showcase/slides.drawings.json +11 -0
  133. package/examples/showcase/slides.md +427 -0
  134. package/package.json +75 -0
  135. package/skills/write-slides/SKILL.md +144 -0
  136. package/src/build/check.js +49 -0
  137. package/src/build/chrome.js +130 -0
  138. package/src/build/components.js +44 -0
  139. package/src/build/config.js +61 -0
  140. package/src/build/drawings.js +14 -0
  141. package/src/build/editorPlugin.js +272 -0
  142. package/src/build/editorServer.js +36 -0
  143. package/src/build/fonts.js +84 -0
  144. package/src/build/homePlugin.js +208 -0
  145. package/src/build/inkPlugin.js +192 -0
  146. package/src/build/ownWrites.js +18 -0
  147. package/src/build/pairing.js +81 -0
  148. package/src/build/pdf.js +34 -0
  149. package/src/build/relayAccess.js +85 -0
  150. package/src/build/slidesPlugin.js +371 -0
  151. package/src/build/themeCheck.js +151 -0
  152. package/src/build/tunnelClient.js +184 -0
  153. package/src/cli/args.js +76 -0
  154. package/src/cli/index.js +758 -0
  155. package/src/cli/migrate.js +123 -0
  156. package/src/cli/skill.js +40 -0
  157. package/src/cli/themes.js +140 -0
  158. package/src/components/CodeBlock.jsx +168 -0
  159. package/src/components/ConnectedViews.jsx +25 -0
  160. package/src/components/Icon.jsx +8 -0
  161. package/src/components/Poll.jsx +67 -0
  162. package/src/components/QrCode.jsx +29 -0
  163. package/src/components/QrCodeTag.jsx +27 -0
  164. package/src/components/Question.jsx +28 -0
  165. package/src/components/Scale.jsx +47 -0
  166. package/src/components/VideoPlayer.jsx +108 -0
  167. package/src/components/WordCloud.jsx +106 -0
  168. package/src/components/activity.jsx +35 -0
  169. package/src/components/callout.css +78 -0
  170. package/src/components/code-block.css +123 -0
  171. package/src/components/columns.css +11 -0
  172. package/src/components/poll.css +81 -0
  173. package/src/components/video-player.css +14 -0
  174. package/src/core/devPath.js +4 -0
  175. package/src/core/editDeck.js +230 -0
  176. package/src/core/icons.js +69 -0
  177. package/src/core/ink.js +221 -0
  178. package/src/core/labels.js +144 -0
  179. package/src/core/outline.js +33 -0
  180. package/src/core/parseSlides.js +152 -0
  181. package/src/core/source.js +137 -0
  182. package/src/core/urls.js +34 -0
  183. package/src/core/validateDeck.js +139 -0
  184. package/src/editor/api.js +67 -0
  185. package/src/editor/components/App.jsx +75 -0
  186. package/src/editor/components/ConflictBanner.jsx +10 -0
  187. package/src/editor/components/DeckSettings.jsx +108 -0
  188. package/src/editor/components/DesignApp.jsx +252 -0
  189. package/src/editor/components/Diagnostics.jsx +10 -0
  190. package/src/editor/components/ExtensionEditor.jsx +66 -0
  191. package/src/editor/components/ExtensionForms.jsx +134 -0
  192. package/src/editor/components/ExtensionsPanel.jsx +114 -0
  193. package/src/editor/components/Field.jsx +24 -0
  194. package/src/editor/components/Inspector.jsx +36 -0
  195. package/src/editor/components/LayoutPicker.jsx +23 -0
  196. package/src/editor/components/LayoutSelect.jsx +25 -0
  197. package/src/editor/components/LookThumbnail.jsx +8 -0
  198. package/src/editor/components/MetaFields.jsx +24 -0
  199. package/src/editor/components/Outline.jsx +28 -0
  200. package/src/editor/components/PalettePicker.jsx +32 -0
  201. package/src/editor/components/Preview.jsx +63 -0
  202. package/src/editor/components/PropsForm.jsx +46 -0
  203. package/src/editor/components/RawSlideEditor.jsx +9 -0
  204. package/src/editor/components/RegionEditor.jsx +15 -0
  205. package/src/editor/components/Resizer.jsx +18 -0
  206. package/src/editor/designLink.js +19 -0
  207. package/src/editor/editor.css +139 -0
  208. package/src/editor/extensions.js +86 -0
  209. package/src/editor/keyboard.js +21 -0
  210. package/src/editor/model.js +38 -0
  211. package/src/editor/sampleDeck.js +165 -0
  212. package/src/editor/saveQueue.js +47 -0
  213. package/src/editor/schema.js +36 -0
  214. package/src/editor/state.js +92 -0
  215. package/src/editor/useDeckDocument.js +67 -0
  216. package/src/extensions/appearance.js +79 -0
  217. package/src/extensions/contrast.js +57 -0
  218. package/src/extensions/discover.js +126 -0
  219. package/src/extensions/manifest.js +209 -0
  220. package/src/extensions/packs.js +268 -0
  221. package/src/extensions/tokens.js +25 -0
  222. package/src/home/Home.jsx +362 -0
  223. package/src/home/home.css +148 -0
  224. package/src/layouts/layoutApi.jsx +205 -0
  225. package/src/layouts/layoutProps.js +30 -0
  226. package/src/layouts/renderSlide.jsx +17 -0
  227. package/src/live/answer/answer.css +34 -0
  228. package/src/live/answer/answer.html +14 -0
  229. package/src/live/answer/answer.js +130 -0
  230. package/src/live/client.js +290 -0
  231. package/src/live/code.js +19 -0
  232. package/src/live/follow.js +17 -0
  233. package/src/live/pairing.js +34 -0
  234. package/src/live/presence.js +33 -0
  235. package/src/live/roomTag.js +38 -0
  236. package/src/live/rooms.js +249 -0
  237. package/src/live/server.js +82 -0
  238. package/src/live/tunnel.js +180 -0
  239. package/src/paths.js +9 -0
  240. package/src/runtime/ReaderView.jsx +193 -0
  241. package/src/runtime/SlideErrorBoundary.jsx +28 -0
  242. package/src/runtime/chrome.jsx +55 -0
  243. package/src/runtime/deck-stage.js +1533 -0
  244. package/src/runtime/design.html +12 -0
  245. package/src/runtime/design.jsx +5 -0
  246. package/src/runtime/editor.html +12 -0
  247. package/src/runtime/editor.jsx +5 -0
  248. package/src/runtime/editorBridge.js +58 -0
  249. package/src/runtime/fit.js +149 -0
  250. package/src/runtime/home.html +13 -0
  251. package/src/runtime/home.jsx +5 -0
  252. package/src/runtime/index.html +15 -0
  253. package/src/runtime/ink/InkLayer.jsx +17 -0
  254. package/src/runtime/ink/Toolbar.jsx +145 -0
  255. package/src/runtime/ink/attach.js +69 -0
  256. package/src/runtime/ink/bus.js +126 -0
  257. package/src/runtime/ink/controller.js +132 -0
  258. package/src/runtime/ink/room.js +101 -0
  259. package/src/runtime/ink/select.js +124 -0
  260. package/src/runtime/ink/server.js +75 -0
  261. package/src/runtime/ink/store.js +55 -0
  262. package/src/runtime/ink/toolbar.css +79 -0
  263. package/src/runtime/main.jsx +863 -0
  264. package/src/runtime/markedSetup.js +147 -0
  265. package/src/runtime/reader.css +59 -0
  266. package/src/runtime/registry.jsx +26 -0
  267. package/src/runtime/syncOrder.js +32 -0
  268. package/src/runtime/themeLoader.js +68 -0
@@ -0,0 +1,153 @@
1
+ # Command guide
2
+
3
+ Type these commands in a terminal. Replace `my-talk.md` with your own slide filename; in a folder that has a `slides.md` you can leave it out. If a folder or filename contains spaces, put the path in quotation marks.
4
+
5
+ For how the commands, the views and the servers fit together, see [Views, commands and servers](views.html).
6
+
7
+ ## Everyday commands
8
+
9
+ | Command | Use it to… |
10
+ |---|---|
11
+ | `mdeck skill --install claude` | Teach your AI assistant to write mdeck slides ([details](claude-skill.html)) |
12
+ | `mdeck new` | Make a presentation with guided questions |
13
+ | `mdeck run my-talk.md` | Open the launch page: present, edit, check and send from one place; slides reload when you save |
14
+ | `mdeck edit my-talk.md` | Edit slides, colors and themes in the browser; saves to the file |
15
+ | `mdeck themes search`, `install <pack>`, `remove`, `update`, `list` | Themes and palettes from the theme repository; see [Install or share a theme](theme-repository.html) |
16
+ | `mdeck design [my-talk.md or folder]` | Look at themes and palettes on a sample deck and fine-tune them; saves to `extensions/` |
17
+ | `mdeck migrate my-talk.md --dry-run` | Preview the changes needed for API 2.0 |
18
+ | `mdeck check my-talk.md` | Check settings and look for missing local files |
19
+ | `mdeck send my-talk.md` | Make one file to send to readers, with a PDF inside |
20
+ | `mdeck build my-talk.md` | Make a folder to host in `dist` |
21
+ | `mdeck pdf my-talk.md` | Make a PDF |
22
+ | `mdeck preview` | Open the last build from the current folder |
23
+ | `mdeck server` | Run the server for polls and for presenting from an iPad on any network ([details](audience.html#use-it-in-a-real-session)) |
24
+ | `mdeck list`, `mdeck starter` | Look up layouts, themes and palettes |
25
+ | `mdeck docs` | Open this documentation |
26
+ | `mdeck --help` | Show a short list of commands |
27
+
28
+ ## The launch page
29
+
30
+ `mdeck run my-talk.md` opens a page on your own computer with everything for this talk. It is what the preview's plain address, such as `http://localhost:5173/`, shows; the slides themselves are at `?view=deck`.
31
+
32
+ - **Preview:** a small live copy of the deck to flip through; click it to open the audience window at that slide.
33
+ - **Present:** the presenter view, audience window and reader view, each in a new tab. The presenter view has notes, drawing controls, a timer and next-slide preview; switch to its slide-only layout for a single screen. The audience window shows slides without notes. Fullscreen is a control inside either view, not a separate view.
34
+ - **Write and learn:** the visual editor and these guides. Each starts the first time you click it.
35
+ - **Send:** buttons that make the `dist` folder, one file to send, or a PDF, next to your slide file, and show them in your file manager.
36
+ - **Polls:** for a deck with polls: the server (built in, or the `server` setting and whether it answers), the join link and session code for phones, and for a server of your own the key that lets your browser move the phones along and reset polls (see below).
37
+ - **Check:** the same problems `mdeck check` reports, such as missing pictures.
38
+
39
+ The key is the one the server was started with. Start `mdeck run` with the same key, for example `MDECK_SERVER_KEY=choose-a-secret mdeck run my-talk.md`, and the launch page shows it, and its presenter and audience buttons open those views with it, so they move the phones along. Local views control this deck through the laptop; paired devices receive only a revocable token. Pairing codes never contain the master key. A hosted presenter can unlock the server separately with `?serverkey=…`; that key is removed from the address as soon as the page has it. It never goes into the slide file, because that file reaches everyone who opens the slides.
40
+
41
+ Two options make the slides reachable from other devices:
42
+
43
+ | Option | What it does |
44
+ |---|---|
45
+ | `--network` | Phones and tablets on the same network can open the slides. |
46
+ | `--server` | An iPad on any network can present through your own server. It takes the server's address, or finds it in the deck's `server` setting or in the `MDECK_SERVER` variable, in that order. The key goes in `MDECK_SERVER_KEY`. |
47
+
48
+ See [Draw on your slides](drawing.html#present-from-an-ipad) for both. The launch page itself and its buttons only work on your own computer. `--port 4000` chooses the port and `--no-open` starts without opening a browser.
49
+
50
+ ## Open a particular guide
51
+
52
+ ```sh
53
+ mdeck docs getting-started
54
+ mdeck docs sharing
55
+ ```
56
+
57
+ Use the page name from its address, without `.html`. The welcome page is `index`.
58
+
59
+ `mdeck docs --no-open` starts the documentation server without opening a browser. `mdeck docs --port 4200` chooses a port number. If the usual port is busy, mdeck tries another one.
60
+
61
+ To make a static copy of the documentation site, use `mdeck docs --build`. This saves it in `docs/site/dist` inside the mdeck project, separately from your presentation builds.
62
+
63
+ ## Edit in the browser
64
+
65
+ ```sh
66
+ mdeck edit my-talk.md
67
+ mdeck edit my-talk.md --no-open
68
+ mdeck edit my-talk.md --port 4300
69
+ ```
70
+
71
+ The editor opens in your browser and writes every change into the slide file. `--no-open` starts it without opening a browser window; `--port` chooses the port. See [Edit slides in your browser](editing.html).
72
+
73
+ ## Design themes and palettes
74
+
75
+ ```sh
76
+ mdeck design my-talk.md
77
+ mdeck design # in a folder without a deck
78
+ mdeck design brand/
79
+ ```
80
+
81
+ The design page shows themes and palettes on a sample deck with every kind of slide, light and dark, and lets you copy a built-in one and fine-tune its colours, fonts, sizes and spacing. With a slide file, it saves into the `extensions` folder beside it and can put the result in the deck. With a folder, or nothing, it saves into that folder's `extensions`, where any deck kept there finds them; no slide file is needed. `--no-open` and `--port` work as for `mdeck edit`.
82
+
83
+ ## Output options
84
+
85
+ | Command | Result |
86
+ |---|---|
87
+ | `mdeck build my-talk.md` | A folder in `dist` with every view, to host or copy |
88
+ | `mdeck build my-talk.md --reader` | A hosted reader folder with speaker notes removed; add `--notes` to retain them |
89
+ | `mdeck build my-talk.md -o talk.html` | Choose the output filename; local media stays alongside it |
90
+ | `mdeck build my-talk.md --single-file -o talk.html` | Embed local images and media in one HTML file of the presentation |
91
+ | `mdeck build my-talk.md --launchers` | Include presenter launchers in the folder build |
92
+ | `mdeck send my-talk.md` | One file for readers: the reader view, speaker notes removed, a PDF inside |
93
+ | `mdeck send my-talk.md --notes` | The same, keeping the speaker notes |
94
+ | `mdeck send my-talk.md --no-pdf` | The same, without rendering the PDF |
95
+ | `mdeck pdf my-talk.md -o talk.pdf` | Render the slides to a PDF file |
96
+ | `--no-drawings` | Leave out the drawings from `my-talk.drawings.json`, for `build`, `send` and `pdf` |
97
+
98
+ See [Send, host or print your slides](sharing.html) for help choosing between them. Unknown options, missing option values and extra filenames stop the command before it changes any output. `--output=path` and `-o path` are both accepted. `mdeck preview --no-open --port 4200` previews without opening a browser and chooses a port.
99
+
100
+ ## Update a deck to API 2.0
101
+
102
+ ```sh
103
+ mdeck migrate my-talk.md --dry-run
104
+ mdeck migrate my-talk.md
105
+ ```
106
+
107
+ The dry run lists changes without writing files. Applying them renames deck settings, changes local extension manifests from `template` to `layout`, updates `mdeck/template-api` imports in local extensions and components, and renames `<deck>.ink.json` to `<deck>.drawings.json`. Unrelated source text and comments stay unchanged. Speaker notes use `:::notes` blocks; there is no migration for metadata notes.
108
+
109
+ Conflicting old and new values, or two drawings files, stop the whole migration before any writes. Originals are copied into `.mdeck-backups/migration-…` beside the deck. Running it again makes no changes. Shared component folders outside the deck are not rewritten; update those imports separately.
110
+
111
+ ## Check more strictly
112
+
113
+ ```sh
114
+ mdeck check my-talk.md --strict
115
+ ```
116
+
117
+ The ordinary check fails when it finds an error. The strict check also fails when it finds a warning, such as a layout name it does not recognize.
118
+
119
+ The check does not measure whether text fits on the slide. Always look through the preview too.
120
+
121
+ ## Layouts, themes and palettes
122
+
123
+ ```sh
124
+ mdeck list layouts my-talk.md
125
+ mdeck starter comparison my-talk.md
126
+ ```
127
+
128
+ The first lists the layouts available to your talk. The second prints starting text for one layout. `mdeck list layouts --json` prints the layout descriptions in a structured form intended for other tools.
129
+
130
+ ```sh
131
+ mdeck list my-talk.md
132
+ mdeck list themes my-talk.md
133
+ ```
134
+
135
+ The first lists every layout, theme and color palette your talk can use, including any kept in an `extensions` folder beside it. The second lists only themes; `palettes` works the same way. `--json` prints the same information for other tools. The complete registry has `schema: 2` and `layouts`, `themes`, `palettes` and `warnings` fields. A filtered listing such as `list layouts --json` is a map keyed by layout ID. Extension TOML manifests still use `schema = 1`.
136
+
137
+ ## Slides from an AI assistant
138
+
139
+ ```sh
140
+ mdeck skill
141
+ mdeck skill --install claude codex
142
+ mdeck skill --print
143
+ ```
144
+
145
+ Installs the slide-writing skill for the assistants you use, or prints it for any other tool. See [Work with an AI assistant](claude-skill.html).
146
+
147
+ ## Why do some examples use Node directly?
148
+
149
+ `mdeck` is the normal command. After the one-time `npm link` setup, you can use it from any folder.
150
+
151
+ `node bin/mdeck.js` runs the same program directly from its project folder. It is useful when working on mdeck itself, but it is not a replacement you need to learn for everyday use.
152
+
153
+ From the project folder, `npm start -- my-talk.md` runs `mdeck run`, and `npm run build -- my-talk.md` builds. These use the same program.
@@ -0,0 +1,134 @@
1
+ # Create interactive content
2
+
3
+ A component is a small piece of JavaScript that puts something interactive on a slide: a chart with sliders, a quiz, a calculator. You do not need one for ordinary presentations, and you do not need to write one yourself. Describe it to your assistant:
4
+
5
+ ```prompt
6
+ Make a component that shows a titration curve, with a slider for the
7
+ added volume, and put it on the slide about equivalence points.
8
+ ```
9
+
10
+ This guide describes the files it writes, for review or for writing them by hand.
11
+
12
+ ## Add a deck-local component
13
+
14
+ Create a `components` folder beside the deck's Markdown file. A file named `Greeting.jsx` is registered as the lowercase tag `<greeting>`:
15
+
16
+ ```jsx
17
+ import { h } from 'preact'
18
+ import { useState } from 'preact/hooks'
19
+
20
+ export default function Greeting({ name = 'everyone' }) {
21
+ const [visible, setVisible] = useState(false)
22
+ return <div>
23
+ <button onClick={() => setVisible(!visible)}>Show greeting</button>
24
+ {visible && <p>Hello, {name}!</p>}
25
+ </div>
26
+ }
27
+ ```
28
+
29
+ Use it in an ordinary slide or a named region:
30
+
31
+ ```html
32
+ <greeting name="garden team" />
33
+ ```
34
+
35
+ The default export must be a Preact component. Deck-local discovery supports `.jsx` files. Import hooks from `preact/hooks`; the build resolves Preact to the framework's instance.
36
+
37
+ ## Share components between decks
38
+
39
+ To use the same components in several decks, keep them in one folder and list it in each deck's settings:
40
+
41
+ ```yaml
42
+ ---
43
+ theme: neue
44
+ components:
45
+ - ../shared-components
46
+ - ~/mdeck-components
47
+ ---
48
+ ```
49
+
50
+ Paths are relative to the deck's Markdown file; `~/` starts in your home folder. Every `.jsx` file in a listed folder becomes a tag, just like the deck's own `components` folder. Helper files in subfolders can be imported from those components.
51
+
52
+ When two folders have a component with the same name, the deck's own `components` folder wins, then the listed folders in their order, then mdeck's built-in components. Edits to a shared component reload every deck that is open in `mdeck run`. `mdeck check` reports a listed folder that does not exist.
53
+
54
+ Builds contain the component code, so a built presentation does not need the shared folder. Someone who gets your slide file to work on needs that folder too.
55
+
56
+ ## How content reaches a component
57
+
58
+ HTML attributes arrive as string props. Text between the opening and closing tags arrives as the `children` string. The HTML-to-component bridge uses `textContent`; it does not pass a nested JSX tree.
59
+
60
+ Deck-local names override built-in component names. Avoid a collision unless you intend to replace that component for the whole deck.
61
+
62
+ ## Assets and dependencies
63
+
64
+ Import assets from JSX so Vite can include them in builds. Install extra dependencies beside the deck, or in the framework checkout. Local component code is included only in decks that discover it.
65
+
66
+ Slides stay mounted while navigating. For media or ongoing work, listen to the `slidechange` event on `document.querySelector('deck-stage')` and check whether `event.detail.slide` contains your component. Clean up listeners when the component unmounts.
67
+
68
+ ## Audience interaction
69
+
70
+ Components can collect answers from phones. An activity has two halves:
71
+
72
+ - **On the slide**, the component itself shows the answers. `useRoom` from `mdeck/live` follows its room on the server and receives every answer live.
73
+ - **On the phones**, the server's answer page shows a form. The component describes that form with a static `phone` function; mdeck calls it for the activity on the presenter's current slide and sends the result to the phones.
74
+
75
+ The phones never load the deck, so the form is a description, not code. Three kinds are available:
76
+
77
+ | `type` | Shows | Other fields | An answer's `value` |
78
+ |---|---|---|---|
79
+ | `choice` | One button per option; the latest tap counts | `options` (list of text) | The chosen option |
80
+ | `text` | A text box and a send button; any number of answers | `placeholder`, `maxLength` (default 200) | The text |
81
+ | `scale` | A row of numbers | `min` (default 1), `max` (default 5), `minLabel`, `maxLabel` | The number |
82
+
83
+ Each takes a `question`. A word collector:
84
+
85
+ ```jsx
86
+ import { h } from 'preact'
87
+ import { useRoom, QrCode } from 'mdeck/live'
88
+
89
+ export default function Words({ room }) {
90
+ const { messages, joinUrl, localJoinUrl } = useRoom(room)
91
+ return <div>
92
+ <p>{messages.map(m => m.data.value).join(' · ')}</p>
93
+ {joinUrl ? <QrCode url={joinUrl} size="280" /> : <a href={localJoinUrl}>Try the answer page</a>}
94
+ </div>
95
+ }
96
+
97
+ // What the phones show while this slide is on screen.
98
+ Words.phone = ({ question }, { slideTitle }) => ({ type: 'text', question: question || slideTitle, placeholder: 'One word' })
99
+ ```
100
+
101
+ `phone(props, { slideTitle })` receives the tag's attributes and the slide's heading. A component without `phone` still shows answers on the slide, but the phones keep waiting while it is on screen. Only the current slide's rooms stay connected, so a deck can hold many activities.
102
+
103
+ `useRoom(room)` returns:
104
+
105
+ | Value | Meaning |
106
+ |---|---|
107
+ | `messages` | Every answer so far, oldest first: `{ n, at, from, data: { value } }` |
108
+ | `joinUrl` | The deck's join link for the QR code, or `null` when phones cannot reach the server |
109
+ | `localJoinUrl` | The answer page on this computer, for trying it out |
110
+ | `code` | The deck's session code |
111
+ | `canReset`, `reset()` | Whether this browser may clear the room, and doing it |
112
+ | `connected` | Whether the live connection is open |
113
+
114
+ `QrCode` draws the code. `latestByDevice(messages)`, also from `mdeck/live`, keeps each device's latest answer, for answers people may change. Where the server runs is described in [Ask your audience](audience.html).
115
+
116
+ ## Print, PDF and Read mode
117
+
118
+ In a PDF, and in the reader's Read mode, every slide is shown at once and none of them is the active slide. There, mdeck reveals every step and places the slide inside an element with the `data-deck-static` attribute. A component that builds up step by step, or waits for its slide, should then show its finished state. Printing can start while the deck is open, so also listen for the stage's `printchange` event:
119
+
120
+ ```jsx
121
+ useEffect(() => {
122
+ const stage = document.querySelector('deck-stage')
123
+ const sync = () => setFinished(!!ref.current.closest('[data-deck-static]'))
124
+ sync()
125
+ stage?.addEventListener('printchange', sync)
126
+ return () => stage?.removeEventListener('printchange', sync)
127
+ }, [])
128
+ ```
129
+
130
+ Transitions are turned off in print, so the finished state appears immediately. After printing, the stage puts each slide back to the step it was on.
131
+
132
+ ## When to use a layout instead
133
+
134
+ A component is a piece of a slide, such as an activity or visualization. A [layout](custom-layouts.html) arranges an entire slide and declares the areas and settings authors can fill in.
@@ -0,0 +1,72 @@
1
+ # Draw on your slides
2
+
3
+ You can draw on a slide while you present, or ahead of time: circle a number, underline a line of code, sketch an arrow. It works with a mouse, a finger, and best with an iPad and its pencil. What you draw is kept with the presentation and shows again the next time you present it, in the reader view and in PDFs.
4
+
5
+ ## Start drawing
6
+
7
+ Press **D** in standalone slides or in the presenter view, or use the pen button (**Draw** in the presenter view). A toolbar appears on the slide:
8
+
9
+ | Tool | What it does |
10
+ |---|---|
11
+ | Pen | Thin to thick with the pencil's pressure. Kept. |
12
+ | Highlighter | A wide, see-through stroke in its own colours, always below the pen's strokes. Kept. |
13
+ | Select and move | Draw a loop around strokes, or tap one, to select it; a finger's tap on a stroke selects it with any tool. Drag inside the dashed box with the pen to move it; a straight line shows handles at its ends, which the pen moves. **Delete** (or the toolbar's bin) removes the selection. |
14
+ | Laser pointer | A red dot with a white core and a short trail that disappears by itself, for pointing at something. With a pencil that can hover, the dot follows it without touching. Never kept. |
15
+ | Eraser | Removes whole strokes you touch. |
16
+
17
+ **Zoom**: two fingers zoom into the slide and move around it, one finger moves a zoomed slide, and Ctrl + scroll (a trackpad pinch) zooms on a laptop. Only the slide grows; the bars and the toolbar keep their size. The audience window shows the same part of the slide. **1:1** at the top left shows the whole slide again, as does the next slide.
18
+
19
+ On a touch screen such as an iPad, drawing is on as soon as the presenter view opens, and in the deck as soon as the pencil touches it, with the toolbar folded into its button in the bottom right corner (↘ folds it again). Until then, a tap on the right third of the screen goes forward, on the left third back, and a swipe does the same. Drawing starts with the laser pointer; choose the pen or the highlighter to write. The pen and the highlighter each have colours and three sizes, and each keeps its own; one pen colour is **Accent**, the accent colour of the theme and palette: a drawing in it changes with them. The other pen colours follow light and dark: on dark slides red, blue and green are lighter, and the text colour is white instead of black. The toolbar also has undo and redo (also Cmd/Ctrl+Z and Cmd/Ctrl+Shift+Z), **Clear this slide**, and **×** to stop drawing; **D** and **Escape** do the same. While you draw, the pencil and the mouse draw; fingers keep working: a swipe to the left goes forward, to the right back, a tap on a stroke selects it, and buttons and polls on the slide still respond. Turn slides with the arrow keys or the presenter view's arrows, as always. Holding the pen still for half a second at the end of a stroke makes it a straight line.
20
+
21
+ **I** hides and shows what was drawn before, for example when a slide should look clean again. The toolbar has the same switch.
22
+
23
+ The audience window, and any other deck window in the same browser, shows every stroke as you draw it.
24
+
25
+ ## Where drawings are kept
26
+
27
+ Drawings live in a file next to your slides: `my-talk.drawings.json` for `my-talk.md`. Keep the two together, and send or check in both.
28
+
29
+ - **With `mdeck run`**, each stroke is saved in that file as soon as you lift the pen. Nothing reloads, and the talk goes on.
30
+ - A slide that gets its first drawing receives an `id:` in its settings, made from its heading, for example `id: the-important-part`. The drawing stays with that slide when you add or move slides. If you change the `id:` in the editor, the drawing moves with it.
31
+ - If you delete a slide that has drawings, they stay in the file. `mdeck check` tells you about them; bring the slide back, or delete them from the file.
32
+ - The first save of a session keeps a copy of the previous file in `.mdeck-backups`, next to your slides.
33
+ - **Opened from a built folder or a single file**, the page has nowhere to save. Drawings are kept in that browser, and the toolbar's download button saves them as the drawings file, to put next to your slides. Safari may clear such browser data after a week without use, so download it after drawing.
34
+
35
+ Builds and PDFs include the drawings. To leave them out, add `--no-drawings`:
36
+
37
+ ```sh
38
+ mdeck pdf my-talk.md --no-drawings
39
+ ```
40
+
41
+ ## Present from an iPad
42
+
43
+ There are two ways.
44
+
45
+ **The iPad on its own.** Connect it to the projector, which usually shows the same picture as the iPad, and open standalone slides with **Present** from the reader view. Swipe left or right to go forward or back, also while drawing. This keeps notes off the wall.
46
+
47
+ **The iPad next to your laptop.** The laptop shows the slides on the projector; you draw and go through the slides on the iPad, with your notes on it.
48
+
49
+ 1. Start `mdeck run my-talk.md --network`, so the iPad in the same network can reach your laptop.
50
+ 2. On the launch page, under **Present from an iPad**, choose **Show pairing code** and scan it with the iPad's camera. The presenter view opens on the iPad, paired with your laptop, so it may save drawings and steer the phones of a poll. It is the same presenter view as on the laptop; pairing only gives it these rights. Once it is open, the launch page says so.
51
+ 3. On the laptop, open the **audience window** from the same place and move it to the projector. It follows the iPad: slides, revealed points, and drawings as you draw them. Navigation in the audience window also updates the iPad's slide, notes and next-slide preview.
52
+
53
+ A pairing code works once, for ten minutes. **Unpair** on the launch page ends every pairing; so does stopping `mdeck run`. Scan a new code afterwards.
54
+
55
+ **The iPad on another network.** Some networks, often big Wi-Fi networks at universities, do not let devices reach each other, and a laptop's firewall may not let the iPad in. With a server of your own (see [Ask your audience](audience.html#use-it-in-a-real-session)) the iPad does not need to reach your laptop at all: your laptop connects out to the server, and the server passes the iPad's requests to it. The slides are not uploaded or stored anywhere.
56
+
57
+ 1. Tell mdeck where your server is: `server: https://rooms.example.org` in the deck's settings, or `MDECK_SERVER` in your shell, or the address after the option in the next step.
58
+ 2. Start `MDECK_SERVER_KEY=your-key mdeck run my-talk.md --server`. The key is the one the server was started with.
59
+ 3. On the launch page, choose **Show pairing code** under **Present from an iPad** and scan it. The address in the code is on your server and contains a long random name, so treat it like a private link.
60
+ 4. Open the **audience window** on the laptop as before. It follows the iPad through the server.
61
+
62
+ Everything else works as with `--network`: drawings are saved in the drawings file beside the deck, and the iPad may steer polls. Editing the slides on the laptop reloads the iPad too. The server only passes on what the presenter and audience pages need; the launch page, the editor and the other files in your folder are not reachable through it. Stopping `mdeck run` ends the connection, and a pairing code stops working when you unpair or stop.
63
+
64
+ On a touch screen the presenter view shows only the slide, with a small bar at the top: timer, previous and next, draw, **Notes** (a drawer with your notes and the next slide, also **N**), full screen, and a button back to the layout with notes beside the slide. Your choice is remembered on that device.
65
+
66
+ With a server of your own (the `server` setting, see [Ask your audience](audience.html)), the same also works with a hosted deck: open the presenter view on the iPad with your key (`?serverkey=…`), and the audience window anywhere else follows it. With the deck opened through `mdeck run` and the server's key set (`MDECK_SERVER_KEY`), the paired iPad and the audience window talk over your own network, and only the polls go through the server. Drawings are then kept on the iPad; download the drawings file after the talk.
67
+
68
+ ## Tips for the iPad
69
+
70
+ - **Full screen**: the full-screen button (four corners) or **F**, where the browser allows it. Safari on an iPhone does not. Alternatively, use Share → **Add to Home Screen**: the deck then opens without Safari's bars. Such a Home Screen app keeps its own browser data, apart from Safari's.
71
+ - **Fingers and the pencil**: the pencil draws, fingers operate the slides, also while drawing. Swipe left to go forward, right to go back; tap a stroke to select it. To draw with a finger (on a device without a pencil), switch on the hand button on the toolbar; fingers then draw instead.
72
+ - **Networks**: many large Wi-Fi networks do not let devices reach each other. If the iPad cannot open the pairing code, connect both to a phone hotspot.
@@ -0,0 +1,59 @@
1
+ # Edit slides in your browser
2
+
3
+ Your assistant and any text editor write the same slide file. If you prefer clicking and typing in forms, mdeck also has a visual editor:
4
+
5
+ ```sh
6
+ mdeck edit my-talk.md
7
+ ```
8
+
9
+ This opens a page on your own computer with three parts:
10
+
11
+ - **Slides**, on the left: the list of slides. Select one, add a new one from a list of layouts, duplicate it, remove it, or move it up and down.
12
+ - **Preview**, in the middle: your presentation, always showing the selected slide. Use the buttons underneath to step through points and slides.
13
+ - **Details**, on the right: what the selected slide contains. Every layout has one or more text areas for its content, and some have settings such as a picture or the width of two columns. Speaker notes and the slide's name are here too. The **Markdown** tab shows the same slide as plain text, if you prefer that.
14
+
15
+ The **Deck** tab in the right panel changes the whole presentation: the theme (chosen from pictures of your first slide in each one), the colors, light or dark, your name and title, and the slide shape.
16
+
17
+ It is not a drag-and-drop editor like PowerPoint or Keynote. You do not place boxes or resize text on the slide; you fill in each slide's content and settings, and the layout and theme decide where things go and how they look. That is what keeps every slide consistent, and what lets you change the whole look with one setting.
18
+
19
+ ## Changes are saved as you go
20
+
21
+ There is no save button. Every change is written into your slide file within a moment; the status next to the file name says *Saved* when it is done. Undo and redo (⌘Z and ⇧⌘Z, or Ctrl on Windows and Linux) work across everything you change, and the file follows along.
22
+
23
+ Because the file is the only copy, you can keep your text editor or your AI assistant working at the same time. When either changes the file, the visual editor shows the change. If both change the same file at the same moment, the editor asks which version to keep.
24
+
25
+ The editor only ever rewrites the parts of the file you change. Your blank lines, comments and the order of everything else stay as they are.
26
+
27
+ Before the first change of each editing session, mdeck copies the file as it was into a `.mdeck-backups` folder beside it, named after the deck and the time, for example `.mdeck-backups/my-talk-2026-09-29T10-15-00Z.md`. It keeps the ten newest copies of each deck. If you keep your slides in Git, add `.mdeck-backups/` to your `.gitignore`.
28
+
29
+ ## Look at and fine-tune themes and palettes
30
+
31
+ **Design themes**, at the top, opens the design page in a tab of its own. You can also start it on its own with `mdeck design my-talk.md`, or with `mdeck design` in a folder that has no deck yet. Themes and palettes are saved in an `extensions` folder next to your slide file (or in that folder), so they travel with the talk.
32
+
33
+ The usual way to get a new look is to describe it to your assistant; see [Create a theme or palette](theme-authoring.html). The design page is where you look at the result and adjust it:
34
+
35
+ - A **theme** is a whole look. The form has its fonts, sizes, spacing and the palettes it offers; the rules that arrange each slide are CSS under *Advanced*.
36
+ - A **palette** is a set of colors, light and dark. Pick a color for each role and see the preview repaint at once.
37
+
38
+ The preview shows a **sample deck** with one slide of every kind: title, chapter, lists and code, a table, callouts, lecture blocks, two columns, a statement, pictures. Step through it to see how a change looks everywhere. **My deck** shows your own slides instead. Above the preview you choose the palette a theme is shown with, the theme a palette is shown in, and light or dark; this only changes the preview.
39
+
40
+ On the left, your own themes and palettes come first. Below them are the ones that come with mdeck; these cannot be changed in place. Choose one and press **Copy to customise** to start from it under a new name. A new palette can also start from plain colours.
41
+
42
+ From the editor, **Customise theme** or **Customise palette** in the **Deck** tab opens the design page with a copy of the one your deck uses. **Use in my deck** puts a theme or palette in your slide file, and the editor shows it straight away.
43
+
44
+ Slide layouts are small programs; ask your assistant for one, or see [Make your own layouts](custom-layouts.html).
45
+
46
+ ## Keyboard shortcuts
47
+
48
+ | Keys | What happens |
49
+ |---|---|
50
+ | ⌘Z, ⇧⌘Z | Undo, redo |
51
+ | ↑ ↓ | Select the previous or next slide (outside text fields) |
52
+ | ⌘↩ | Add a slide after the selected one |
53
+ | ⌘⌫ | Remove the selected slide |
54
+
55
+ ## Good to know
56
+
57
+ - `mdeck edit` runs only on your computer. It is not a website other people can open.
58
+ - The editor checks your slides the same way `mdeck check` does and shows problems next to the slide they belong to.
59
+ - To present, use the **Present** button at the top right, or open the presenter view from the launch page of `mdeck run my-talk.md`.
@@ -0,0 +1,103 @@
1
+ # Make your first presentation
2
+
3
+ You will install mdeck, teach your AI assistant how to write mdeck slides, give it material you already have, and open the deck it makes. If mdeck is already installed, skip to “Teach your assistant about mdeck.”
4
+
5
+ ## Set up mdeck once
6
+
7
+ mdeck needs Node.js and npm on your computer. Install [Node.js](https://nodejs.org) (version 22 or newer); npm comes with it.
8
+
9
+ Open a terminal. A terminal is an app where you type short commands: Terminal on macOS, or PowerShell on Windows. A text editor may also have a Terminal menu.
10
+
11
+ Run this command to install mdeck:
12
+
13
+ ```sh
14
+ npm install -g mdeck
15
+ ```
16
+
17
+ You normally do this only once. To update later, run it again.
18
+
19
+ Check that the command is ready:
20
+
21
+ ```sh
22
+ mdeck --help
23
+ ```
24
+
25
+ If your computer does not recognize `npm` or `mdeck`, see [When something goes wrong](troubleshooting.html#the-command-is-not-recognized).
26
+
27
+ ## Teach your assistant about mdeck
28
+
29
+ mdeck comes with a set of instructions, called a *skill*, that tells an AI assistant how mdeck slides are written, which layouts and looks exist, and how to check its work. Install it for the assistant you use:
30
+
31
+ ```sh
32
+ mdeck skill --install claude
33
+ ```
34
+
35
+ Replace `claude` with `codex`, `cursor`, `copilot` or `gemini` for those tools. Run `mdeck skill` to see the list. For Cursor, Copilot and Gemini, run it in your talk's folder.
36
+
37
+ ## Hand over your material
38
+
39
+ Make a folder for your talk and copy in what you have: old slides, a PDF, a Word document, photos, or rough notes. Open your assistant in that folder and tell it what to make from them, for whom, and how long:
40
+
41
+ ```prompt
42
+ /write-slides Make a 10-minute talk for our team from report.docx and
43
+ the photos in img/. It is about what we learned from the spring
44
+ garden project. Keep my three main points, in English.
45
+ ```
46
+
47
+ In other assistants than Claude Code and Gemini CLI, simply ask for an mdeck presentation. The assistant writes a deck such as `spring-garden.md` from your files, checks it, and tells you what to do next.
48
+
49
+ No material yet? Describing the talk works too; the assistant then drafts the content as well, and you have more to check.
50
+
51
+ ## Open the preview
52
+
53
+ In a terminal opened in your talk's folder, run:
54
+
55
+ ```sh
56
+ mdeck run spring-garden.md
57
+ ```
58
+
59
+ Your browser opens the launch page for your talk. Click **Audience window** to see just the slides, or **Presenter view** for notes, drawing controls and a timer. Press the right arrow key to move to the next slide, and the left arrow key to go back. Press **F** to go fullscreen.
60
+
61
+ Keep the terminal open while working. If the browser does not open, click or copy the launch page address shown in the terminal. It usually is `http://localhost:5173/`. The [command guide](commands.html#the-launch-page) describes everything else on the launch page.
62
+
63
+ ## Make it yours
64
+
65
+ Read through every slide and its notes, next to your original material. Check that nothing important was dropped and nothing was added that you did not say. Then tell the assistant what to change:
66
+
67
+ ```prompt
68
+ Slide 3 is too dense; split it in two. You left out the part about
69
+ the tomato beds from page 4 of the report. Make the closing slide a
70
+ big statement.
71
+ ```
72
+
73
+ The preview reloads each time the file changes. Small things, such as a word or a number, are often quicker to change yourself: open the `.md` file in any text editor and save. [Read and adjust your slides](writing.html) explains what you will see in the file.
74
+
75
+ That is the everyday workflow: ask, look at the preview, adjust. When you are finished, press `Ctrl+C` in the terminal to stop it.
76
+
77
+ ## Prefer to start without an assistant?
78
+
79
+ Run:
80
+
81
+ ```sh
82
+ mdeck new
83
+ ```
84
+
85
+ mdeck asks for a file name, a theme, colors, and some starting slide layouts. Press Enter to accept a suggested answer. Replace the example words in the new file with your own. The starter may mention a logo image. Add that image, or remove the `logo:` line if you do not want a logo.
86
+
87
+ Or make the file yourself: save a new plain-text file called `my-talk.md` (not `my-talk.md.txt`), paste this in, and run `mdeck run my-talk.md`:
88
+
89
+ ```markdown
90
+ # My first presentation
91
+
92
+ Hello, everyone!
93
+
94
+ ---
95
+
96
+ # Three things to remember
97
+
98
+ - Start with one idea.
99
+ - Show a helpful example.
100
+ - Leave time for questions.
101
+ ```
102
+
103
+ Next, learn [how to work with your assistant](claude-skill.html) or [choose a layout](layouts.html).
@@ -0,0 +1,126 @@
1
+ # Choose a slide layout
2
+
3
+ A layout arranges your words and pictures. Your assistant chooses one for each slide; this page shows what each looks like in the file, so you know what to ask for:
4
+
5
+ ```prompt
6
+ Make slide 2 a title slide, and put the photo of the garden beside
7
+ the text on slide 5.
8
+ ```
9
+
10
+ To change a layout by hand, copy one of the examples below and replace the example text with your own.
11
+
12
+ <!-- preview -->
13
+
14
+ ## A title and subtitle
15
+
16
+ Use `title` at the beginning of a talk. The `#` line is the title; the `##` line is its subtitle.
17
+
18
+ ```markdown
19
+ :::meta
20
+ layout: title
21
+ :::
22
+ # A small idea
23
+ ## A clear presentation
24
+ ```
25
+
26
+ ## A normal content slide
27
+
28
+ Leave out the layout setting for a heading with ordinary content underneath:
29
+
30
+ ```markdown
31
+ # What we learned
32
+
33
+ - Make room for questions.
34
+ - Use examples people recognize.
35
+ - End with a next step.
36
+ ```
37
+
38
+ ## A big statement or quote
39
+
40
+ Use `focus` for a short message. The optional `attribution` names the person who said it.
41
+
42
+ ```markdown
43
+ :::meta
44
+ layout: focus
45
+ attribution: "Our team"
46
+ :::
47
+ # Good questions make better conversations.
48
+ ```
49
+
50
+ ## A new section
51
+
52
+ Use `chapter` between the main parts of a longer talk:
53
+
54
+ ```markdown
55
+ :::meta
56
+ layout: chapter
57
+ number: 2
58
+ part: "What we learned"
59
+ :::
60
+ # Listen first
61
+
62
+ Three lessons from our conversations.
63
+ ```
64
+
65
+ The `part` name also becomes the section label on following slides. Set `section:` on a later slide to change it.
66
+
67
+ ## A picture beside your words
68
+
69
+ Use `image-text` and tell mdeck where the picture is saved:
70
+
71
+ ```markdown
72
+ :::meta
73
+ layout: image-text
74
+ image: ./img/garden.jpg
75
+ alt: "A community garden in spring"
76
+ :::
77
+ # A place to grow
78
+
79
+ Our neighbors turned an empty space into a garden.
80
+ ```
81
+
82
+ Replace the image path with your own. The [picture guide](pictures-and-video.html) explains how paths work.
83
+
84
+ ## Two areas side by side
85
+
86
+ Use `split` and name the content for each side. A **slot** is simply a named area on the slide.
87
+
88
+ ```markdown
89
+ :::meta
90
+ layout: split
91
+ props:
92
+ ratio: [1, 2]
93
+ :::
94
+ # Two ways to begin
95
+
96
+ :::slot left
97
+ ## Ask
98
+ What do people need?
99
+ :::
100
+
101
+ :::slot right
102
+ ## Listen
103
+ Make space for their answers before suggesting a solution.
104
+ :::
105
+ ```
106
+
107
+ `ratio: [1, 2]` makes the right side twice as wide as the left. Use `[1, 1]` for equal widths. The heading above the slots is shared by both sides.
108
+
109
+ Some older examples do not name the sides. In those slides, mdeck puts the first piece of content on the left and the rest on the right.
110
+
111
+ ## A picture that fills the slide
112
+
113
+ Use `full-bleed-image` for a large photograph. `overlay: true` adds the theme's overlay treatment to help the title stand out.
114
+
115
+ ```markdown
116
+ :::meta
117
+ layout: full-bleed-image
118
+ image: ./img/garden.jpg
119
+ overlay: true
120
+ :::
121
+ # Small beginnings
122
+ ```
123
+
124
+ ## More layouts
125
+
126
+ Your presentation folder can contain extra layouts made for your team or organization. Learn how to [use a reusable layout](reusable-layouts.html). If none of them fits, your assistant can make a new one for the talk, just by describing it.