mdeck 2.3.0 → 3.1.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 (101) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/README.md +9 -9
  3. package/assets/base.css +4 -1
  4. package/assets/extensions/palettes/lagoon/extension.toml +3 -0
  5. package/assets/extensions/palettes/neon/extension.toml +3 -0
  6. package/assets/extensions/palettes/nordic/extension.toml +3 -0
  7. package/assets/extensions/palettes/paper/extension.toml +30 -0
  8. package/assets/extensions/palettes/swiss/extension.toml +3 -0
  9. package/assets/extensions/themes/academic/extension.toml +3 -0
  10. package/assets/extensions/themes/aurora/extension.toml +3 -0
  11. package/assets/extensions/themes/minimal/extension.toml +48 -0
  12. package/assets/extensions/themes/minimal/styles.css +342 -0
  13. package/assets/extensions/themes/neue/extension.toml +3 -0
  14. package/docs/reference/authoring.md +13 -18
  15. package/docs/reference/claude-skill.md +1 -1
  16. package/docs/reference/extensions.md +40 -26
  17. package/docs/reference/palettes.md +8 -12
  18. package/docs/reference/themes.md +8 -7
  19. package/docs/site/content/appearance.md +35 -49
  20. package/docs/site/content/commands.md +3 -2
  21. package/docs/site/content/theme-authoring.md +1 -1
  22. package/docs/site/content/theme-repository.md +44 -32
  23. package/docs/site/examples/first-talk.md +1 -1
  24. package/docs/site/images/themes/academic-dark.webp +0 -0
  25. package/docs/site/images/themes/academic-light.webp +0 -0
  26. package/docs/site/images/themes/academic.webp +0 -0
  27. package/docs/site/images/themes/aurora-dark.webp +0 -0
  28. package/docs/site/images/themes/aurora-light.webp +0 -0
  29. package/docs/site/images/themes/aurora.webp +0 -0
  30. package/docs/site/images/themes/minimal-dark.webp +0 -0
  31. package/docs/site/images/themes/minimal-light.webp +0 -0
  32. package/docs/site/images/themes/minimal.webp +0 -0
  33. package/docs/site/images/themes/neue-dark.webp +0 -0
  34. package/docs/site/images/themes/neue-light.webp +0 -0
  35. package/docs/site/images/themes/neue.webp +0 -0
  36. package/docs/site/pages.js +1 -1
  37. package/examples/custom-layouts/slides.md +1 -1
  38. package/examples/poll/slides.md +1 -1
  39. package/examples/python/slides.md +2 -2
  40. package/examples/showcase/slides.md +3 -3
  41. package/package.json +2 -2
  42. package/skills/write-slides/SKILL.md +2 -2
  43. package/src/build/check.js +0 -7
  44. package/src/build/editorPlugin.js +26 -13
  45. package/src/build/themeCheck.js +17 -6
  46. package/src/cli/args.js +2 -1
  47. package/src/cli/index.js +7 -6
  48. package/src/cli/themes.js +117 -87
  49. package/src/core/validateDeck.js +4 -2
  50. package/src/editor/api.js +15 -6
  51. package/src/editor/components/App.jsx +4 -2
  52. package/src/editor/components/DesignApp.jsx +16 -9
  53. package/src/editor/components/ExtensionEditor.jsx +16 -6
  54. package/src/editor/components/ExtensionsPanel.jsx +28 -34
  55. package/src/editor/designLink.js +18 -1
  56. package/src/editor/sampleDeck.js +3 -1
  57. package/src/extensions/appearance.js +2 -1
  58. package/src/extensions/discover.js +44 -11
  59. package/src/extensions/installed.js +88 -0
  60. package/src/extensions/manifest.js +20 -3
  61. package/src/extensions/moved.js +20 -0
  62. package/src/extensions/packages.js +318 -0
  63. package/src/home/Home.jsx +12 -6
  64. package/src/layouts/layoutApi.jsx +10 -2
  65. package/src/runtime/themeLoader.js +5 -2
  66. package/assets/extensions/palettes/brand/extension.toml +0 -29
  67. package/assets/extensions/palettes/cobalt/extension.toml +0 -27
  68. package/assets/extensions/palettes/ember/extension.toml +0 -27
  69. package/assets/extensions/palettes/forest/extension.toml +0 -27
  70. package/assets/extensions/palettes/graphite/extension.toml +0 -27
  71. package/assets/extensions/palettes/pastel/extension.toml +0 -30
  72. package/assets/extensions/palettes/phosphor/extension.toml +0 -27
  73. package/assets/extensions/palettes/terra/extension.toml +0 -27
  74. package/assets/extensions/themes/duet/extension.toml +0 -46
  75. package/assets/extensions/themes/duet/styles.css +0 -573
  76. package/assets/extensions/themes/editorial/extension.toml +0 -46
  77. package/assets/extensions/themes/editorial/styles.css +0 -574
  78. package/assets/extensions/themes/fhnw/extension.toml +0 -61
  79. package/assets/extensions/themes/fhnw/styles.css +0 -604
  80. package/assets/extensions/themes/sketch/extension.toml +0 -48
  81. package/assets/extensions/themes/sketch/styles.css +0 -633
  82. package/assets/extensions/themes/terminal/extension.toml +0 -38
  83. package/assets/extensions/themes/terminal/styles.css +0 -550
  84. package/docs/site/images/themes/duet-dark.webp +0 -0
  85. package/docs/site/images/themes/duet-light.webp +0 -0
  86. package/docs/site/images/themes/duet.webp +0 -0
  87. package/docs/site/images/themes/editorial-dark.webp +0 -0
  88. package/docs/site/images/themes/editorial-light.webp +0 -0
  89. package/docs/site/images/themes/editorial.webp +0 -0
  90. package/docs/site/images/themes/fhnw.webp +0 -0
  91. package/docs/site/images/themes/sketch-dark.webp +0 -0
  92. package/docs/site/images/themes/sketch-light.webp +0 -0
  93. package/docs/site/images/themes/sketch.webp +0 -0
  94. package/docs/site/images/themes/terminal-dark.webp +0 -0
  95. package/docs/site/images/themes/terminal-light.webp +0 -0
  96. package/docs/site/images/themes/terminal.webp +0 -0
  97. package/examples/python/.mdeck-backups/slides.drawings-2026-10-06T08-36-47Z.json +0 -19
  98. package/examples/python/.mdeck-backups/slides.drawings-2026-10-06T11-27-30Z.json +0 -6
  99. package/examples/showcase/.mdeck-backups/slides.drawings-2026-10-06T08-08-30Z.json +0 -10
  100. package/examples/showcase/.mdeck-backups/slides.drawings-2026-10-06T11-41-35Z.json +0 -13
  101. package/src/extensions/packs.js +0 -268
@@ -211,32 +211,46 @@ Built-in extensions cannot be changed; copy one under a new id to change it.
211
211
  New themes always start as a copy. Layouts are not edited there. The page
212
212
  writes the same files described above.
213
213
 
214
- ## Installed extensions and packs
215
-
216
- mdeck looks for extensions in three places, in this order: the built-in ones,
217
- the user's folder (`~/.mdeck/extensions`, or `$MDECK_HOME/extensions`), and the
218
- `extensions/` folder beside the deck. An id may appear only once, except that a
219
- deck's own extension replaces a user one with the same id (with a warning).
220
- `mdeck check` warns when a deck uses a theme or palette from the user's folder,
221
- because the slide file then works only on that computer.
222
-
223
- `mdeck themes install <pack>` copies a pack from the theme repository into the
224
- deck's folder, or with `--global` into the user's. A pack is a folder with a
225
- `pack.toml` (`schema`, `id`, `title`, `description`, `version`, `author`,
226
- `license`, `homepage`, and `mdeck = ">=X.Y.Z"`, the oldest mdeck it works with)
227
- and one folder per theme or palette, each holding only `extension.toml` and,
228
- for a theme, `styles.css`. Theme fonts must come from `https://fonts.googleapis.com/`
229
- or `https://fonts.bunny.net/`, and `styles.css` may contain neither `@import`
230
- nor `url()` other than `data:` URLs. Each installed folder gets a
231
- `.mdeck-pack.json` with the pack, its version, its source and a checksum of
232
- every file; `update` and `remove` refuse to touch files changed since then
233
- unless given `--force`.
234
-
235
- The repository serves `index.json` (`{ schema: 1, packs: [...] }`, each with
236
- its ids, `url`, `sha256` and `previews`) and one JSON file per pack version
237
- holding the text of its files. `mdeck themes build <packs> -o <out> [--check]`
238
- writes both from a folder of packs; `MDECK_THEMES_URL` points mdeck at another
239
- index.
214
+ ## Installed themes and palettes
215
+
216
+ Every theme and palette can be installed on its own, as a package. mdeck looks
217
+ for them in this order: its own (`assets/extensions/`, minus those removed
218
+ with `mdeck themes remove` or `mdeck palettes remove`, listed in
219
+ `~/.mdeck/removed.json` as `theme:<id>` or `palette:<id>`), the user's folder
220
+ (`~/.mdeck/extensions`, or `$MDECK_HOME/extensions`), and the `extensions/`
221
+ folder beside the deck. For themes and palettes a later place replaces an
222
+ earlier one with the same id: an installed newer version replaces the built-in
223
+ one, and a deck's own copy replaces both (with a warning when it replaces one
224
+ installed for every deck). Layouts are built in and may not be replaced;
225
+ within one place an id may appear only once per kind.
226
+
227
+ A theme or palette meant to be installed carries a few more settings in its
228
+ `extension.toml`: `version` (`1.0.0`), `author`, `license`, `homepage`, and
229
+ `mdeck = ">=X.Y.Z"`, the oldest mdeck it works with. What it needs follows
230
+ from its settings: a theme needs its default `palette`, and a palette with
231
+ `theme = "<id>"` needs that theme. Installing one installs what it needs;
232
+ removing a palette is refused while an installed theme uses it by default, and
233
+ removing a theme removes the palettes that belong only to it.
234
+
235
+ `mdeck themes install <theme>` and `mdeck palettes install <palette>` install
236
+ for every deck, into `themes/<id>/` or `palettes/<id>/` in the user's folder;
237
+ given a slide file, a folder or `--local`, into the `extensions/` folder
238
+ beside the deck (what it needs too, unless it is built in). Installing a
239
+ built-in one for every deck offers it again. A package holds only
240
+ `extension.toml` and, for a theme, `styles.css`. Theme fonts must come from
241
+ `https://fonts.googleapis.com/` or `https://fonts.bunny.net/`, and
242
+ `styles.css` may contain neither `@import` nor `url()` other than `data:`
243
+ URLs. Each installed folder gets a `.mdeck-package.json` with its kind, id,
244
+ version, source and a checksum of every file; `update` and `remove` refuse to
245
+ touch files changed since then unless given `--force`.
246
+
247
+ The repository serves `catalogue.json` (`{ schema: 2, themes: [...],
248
+ palettes: [...] }`, each with its id, version, default palette or theme,
249
+ `url`, `sha256`, `preview`, and `builtIn` for those that come with mdeck) and
250
+ one JSON file per version holding the text of its files.
251
+ `mdeck themes build <repository> -o <out> [--check]` writes both from a
252
+ folder with `themes/` and `palettes/`; `MDECK_THEMES_URL` points mdeck at
253
+ another catalogue. Without a connection, mdeck offers its built-in ones.
240
254
 
241
255
  ## Listing what is available
242
256
 
@@ -9,7 +9,7 @@ Every palette is a family with two variants, **light** and **dark**. A deck choo
9
9
  ```yaml
10
10
  ---
11
11
  theme: neue
12
- palette: terra # optional; without it the theme's default palette
12
+ palette: nordic # optional; without it the theme's default palette
13
13
  appearance: dark # optional: light or dark; without it the theme's default
14
14
  ---
15
15
  ```
@@ -20,21 +20,17 @@ The presenter view and the reader view switch palette and light or dark without
20
20
 
21
21
  | Palette | Light | Dark |
22
22
  |---|---|---|
23
- | `lagoon` | teal on warm stone, orange second accent | deep teal-black, bright teal |
24
23
  | `swiss` | white, black and signal red | black, white and red |
25
- | `cobalt` | ultramarine on white, vivid orange second accent | deep navy with a luminous blue |
26
24
  | `nordic` | ice grey, deep navy and a cool steel blue | polar night with ice blue |
27
- | `graphite` | black and white with a steel-blue accent | charcoal with light steel blue |
28
- | `terra` | cream, deep navy and brick red | deep navy, cream and coral |
29
- | `forest` | deep green with moss and ochre | forest night with light green |
30
- | `ember` | sand and espresso with orange | dark brown with glowing orange |
31
25
  | `neon` | white with violet and magenta | black with neon violet and pink |
32
- | `phosphor` | a printout: near-black on paper, green and ochre | a terminal screen: phosphor green on black, amber |
33
- | `pastel` | Catppuccin Latte: soft grey-blue paper, mauve and peach | Catppuccin Mocha: dusk blue with pastel mauve and peach |
26
+ | `lagoon` | teal on warm stone, orange second accent | deep teal-black, bright teal |
27
+ | `paper` | off-white paper and near-black ink with one orange accent | charcoal with a softer orange |
34
28
 
35
29
  `mdeck list palettes` lists them, with any of your own.
36
30
 
37
- Each theme names a default: neue uses `swiss`, editorial `terra`, duet `cobalt`, aurora `neon`, terminal `phosphor` (dark), academic `nordic`, sketch `pastel`. The FHNW theme uses its own palette `brand` (FHNW yellow, black and white) and offers no other.
31
+ Each theme names a default: neue uses `swiss`, academic `nordic`, aurora `neon`.
32
+
33
+ More palettes are in the [theme repository](https://github.com/tilman-schieber/mdeck-themes). The palettes cobalt, terra, phosphor, pastel and forest, built in before mdeck 3.0, are there; installing the theme duet, editorial, terminal or sketch brings its palette along. Graphite and ember were removed because the built-in nordic and paper look almost the same; a deck that names them is told which to use. Install one with `mdeck palettes install <palette> my-talk.md`.
38
34
 
39
35
  ## Colours
40
36
 
@@ -90,7 +86,7 @@ description = "Sea blue and rust on chalk white."
90
86
 
91
87
  Colour names start with dashes, so quote them as TOML keys. A dark variant also gets dark code colours and an inverted logo; set `--logo-filter` or the `--token-*` code colours in `[dark]` to change that.
92
88
 
93
- `theme = "my-theme"` makes a palette private: only that theme offers it, as FHNW does with `brand`.
89
+ `theme = "my-theme"` makes a palette private: only that theme offers it, as a corporate design theme does with its own colours.
94
90
 
95
91
  ## Readability
96
92
 
@@ -103,4 +99,4 @@ Colour names start with dashes, so quote them as TOML keys. A dark variant also
103
99
  | both accents on the background | 3 : 1 (large type) |
104
100
  | text on the accent | 3 : 1 |
105
101
 
106
- The built-in palettes meet these in both variants. A private palette may use its accent only as a surface (FHNW's yellow), so its accents are not checked as text.
102
+ The built-in palettes meet these in both variants. A private palette may use its accent only as a surface (a corporate yellow, say), so its accents are not checked as text.
@@ -18,15 +18,16 @@ theme: neue
18
18
  |---|---|---|
19
19
  | `neue` | Swiss style: large flush-left type, rules, red on white | `swiss` |
20
20
  | `aurora` | Northern lights: curtains of light, night-sky chapters, frosted glass | `neon` |
21
- | `duet` | Two voices: heavy slab headings, split slides as two colour fields, diagonal chapters | `cobalt` |
22
- | `editorial` | Magazine spread: masthead rule, drop caps, pull quotes, Roman chapter numerals | `terra` |
23
- | `fhnw` | The FHNW corporate design | `brand` (the only one) |
24
- | `terminal` | A terminal session: prompts, a blinking cursor, a tmux status bar | `phosphor`, dark |
21
+ | `minimal` | Nothing but the content: system fonts, calm type, no decoration; works offline | `paper` |
25
22
  | `academic` | A lecture: compact type, the heading fixed at the top and the content centred below, theorem and definition blocks, booktabs tables, a footnote rule | `nordic` |
26
- | `sketch` | A sketchbook: handwriting on dotted paper, marker scribbles, sticky-note callouts, taped photos | `pastel` |
27
23
 
28
24
  `mdeck list my-talk.md` lists them with their descriptions.
29
25
 
26
+ More themes are in the [theme repository](https://github.com/tilman-schieber/mdeck-themes):
27
+ `mdeck themes search` lists them, and `mdeck themes install <theme> my-talk.md`
28
+ puts one beside the deck, with its default palette. The themes duet, editorial,
29
+ fhnw, terminal and sketch, built in before mdeck 3.0, are there.
30
+
30
31
  ## Theme structure
31
32
 
32
33
  ```text
@@ -78,8 +79,8 @@ A parameter's default is its token's value. Unknown parameter names are
78
79
  reported by `mdeck check`.
79
80
 
80
81
  Optional settings: `description`, `appearance = "dark"` for a theme that starts
81
- dark, and `palettes = [...]` to offer only those palettes (the FHNW theme offers
82
- only `brand`). `[files] styles` may name one stylesheet or a list.
82
+ dark, and `palettes = [...]` to offer only those palettes (a corporate design
83
+ theme can offer only its own palette). `[files] styles` may name one stylesheet or a list.
83
84
 
84
85
  ### `styles.css`
85
86
 
@@ -27,14 +27,10 @@ If you already have a settings block there, change the existing lines rather tha
27
27
  |---|---|
28
28
  | `neue` | Swiss style: large type, clear lines, red on white |
29
29
  | `aurora` | Northern lights: curtains of light, night-sky chapters and glass |
30
- | `duet` | Two voices: two accent colours that take turns, slab headings |
31
- | `editorial` | A magazine spread: serif headlines, drop caps, pull quotes |
32
- | `fhnw` | The FHNW visual identity |
33
- | `terminal` | A terminal session: headings typed at a prompt, a blinking cursor, a status bar |
30
+ | `minimal` | Nothing but the content: system fonts, calm type, no decoration; works offline |
34
31
  | `academic` | A lecture: compact slides, theorem and definition boxes, tables like in a paper |
35
- | `sketch` | A sketchbook: handwriting, marker scribbles, sticky notes; a chalkboard in the dark |
36
32
 
37
- Each theme comes with colours that suit it, so you do not have to choose any.
33
+ Each theme comes with colours that suit it, so you do not have to choose any. More themes are in the theme repository (see “Themes that moved to the repository” below).
38
34
 
39
35
  ## See the themes
40
36
 
@@ -52,41 +48,17 @@ Default colours: `swiss`.
52
48
 
53
49
  Default colours: `neon`.
54
50
 
55
- ### Duet
56
-
57
- [![The tour's title slide in the Duet theme](images/themes/duet.webp)](images/themes/duet.webp)
58
-
59
- Default colours: `cobalt`.
60
-
61
- ### Editorial
62
-
63
- [![The tour's title slide in the Editorial theme](images/themes/editorial.webp)](images/themes/editorial.webp)
64
-
65
- Default colours: `terra`.
66
-
67
- ### FHNW
68
-
69
- [![The tour's title slide in the FHNW theme](images/themes/fhnw.webp)](images/themes/fhnw.webp)
70
-
71
- Default colours: its own FHNW colours.
72
-
73
- ### Terminal
74
-
75
- [![The tour's title slide in the Terminal theme](images/themes/terminal.webp)](images/themes/terminal.webp)
76
-
77
- Default colours: `phosphor`, dark.
78
-
79
51
  ### Academic
80
52
 
81
53
  [![The tour's title slide in the Academic theme](images/themes/academic.webp)](images/themes/academic.webp)
82
54
 
83
55
  Default colours: `nordic`.
84
56
 
85
- ### Sketch
57
+ ### Minimal
86
58
 
87
- [![The tour's title slide in the Sketch theme](images/themes/sketch.webp)](images/themes/sketch.webp)
59
+ [![The tour's title slide in the Minimal theme](images/themes/minimal.webp)](images/themes/minimal.webp)
88
60
 
89
- Default colours: `pastel`.
61
+ Default colours: `paper`. It uses the fonts already on the computer, so it needs no internet connection and looks plain on purpose.
90
62
 
91
63
  ## Choose colours
92
64
 
@@ -94,27 +66,19 @@ To use other colours, set `palette` to one of these:
94
66
 
95
67
  | Name to use | Colours |
96
68
  |---|---|
97
- | `lagoon` | Teal on warm stone |
98
69
  | `swiss` | White, black and signal red (neue's own) |
99
- | `cobalt` | Strong ultramarine on white |
100
- | `nordic` | Ice grey, deep navy and a cool steel blue |
101
- | `graphite` | Black and white with a steel-blue accent |
102
- | `terra` | Cream, deep navy and brick red |
103
- | `forest` | Deep green with moss and ochre |
104
- | `ember` | Sand and espresso with orange |
105
- | `neon` | Violet and magenta, loud |
106
- | `phosphor` | Green on black, like an old terminal screen |
107
- | `pastel` | Soft pastels, mauve and peach (in the style of Catppuccin) |
70
+ | `nordic` | Ice grey, deep navy and a cool steel blue (academic's own) |
71
+ | `neon` | Violet and magenta, loud (aurora's own) |
72
+ | `lagoon` | Teal on warm stone |
73
+ | `paper` | Off-white and near-black with one orange accent (minimal's own) |
108
74
 
109
75
  ```yaml
110
76
  ---
111
77
  theme: neue
112
- palette: terra
78
+ palette: paper
113
79
  ---
114
80
  ```
115
81
 
116
- The FHNW theme always uses the FHNW colours.
117
-
118
82
  ## Light or dark
119
83
 
120
84
  Every palette has a light and a dark version. Choose dark for a dark lecture hall, light for a bright room:
@@ -122,7 +86,7 @@ Every palette has a light and a dark version. Choose dark for a dark lecture hal
122
86
  ```yaml
123
87
  ---
124
88
  theme: neue
125
- palette: terra
89
+ palette: nordic
126
90
  appearance: dark
127
91
  ---
128
92
  ```
@@ -131,7 +95,7 @@ Some slides use the other version on purpose: neue's statement slides are dark i
131
95
 
132
96
  ## Every theme in every palette
133
97
 
134
- The first chapter slide of the tour in each palette a theme offers. Choose a theme above the pictures; click a sheet to see it larger. The FHNW theme has only its own colours, so it is not shown here.
98
+ The first chapter slide of the tour in each palette a theme offers. Choose a theme above the pictures; click a sheet to see it larger. A theme that offers only its own colours is not shown here.
135
99
 
136
100
  Some themes turn their chapter slides around on purpose: aurora's are a night sky in a light talk, and light in a dark one.
137
101
 
@@ -155,7 +119,29 @@ Its theme, palette and light or dark controls, under the notes, let you try othe
155
119
 
156
120
  ## More themes from other people
157
121
 
158
- The theme repository has themes and palettes others made. `mdeck themes search` lists them, and `mdeck themes install <pack> my-talk.md` puts one beside your slides; see [Install or share a theme](theme-repository.html).
122
+ The themes above come with mdeck. The theme repository has more: `mdeck themes search` and `mdeck palettes search` list them, and `mdeck themes install <theme>` installs one for all your decks, with its palette. You can also remove the ones you never use; see [Install, remove or share a theme](theme-repository.html).
123
+
124
+ ### Themes that moved to the repository
125
+
126
+ Earlier versions of mdeck came with more themes and palettes. They are now in the theme repository:
127
+
128
+ | Theme | What it looks like (its palette) |
129
+ |---|---|
130
+ | `duet` | Two accent colours that take turns, slab headings (`cobalt`) |
131
+ | `editorial` | A magazine spread with serif headlines and pull quotes (`terra`) |
132
+ | `fhnw` | The FHNW visual identity, with its own `brand` palette only |
133
+ | `terminal` | Headings typed at a prompt, a status bar; it starts dark (`phosphor`) |
134
+ | `sketch` | Handwriting, marker scribbles, sticky notes (`pastel`) |
135
+
136
+ The palette `forest` is there too: `mdeck palettes install forest`.
137
+
138
+ The palettes `graphite` and `ember` were removed: use `nordic` or `paper`, which come with mdeck and look almost the same.
139
+
140
+ A deck that still names one of them stops with a message that tells you what to install, for example:
141
+
142
+ ```sh
143
+ mdeck themes install duet
144
+ ```
159
145
 
160
146
  ## Add your name and organization
161
147
 
@@ -12,7 +12,8 @@ For how the commands, the views and the servers fit together, see [Views, comman
12
12
  | `mdeck new` | Make a presentation with guided questions |
13
13
  | `mdeck run my-talk.md` | Open the launch page: present, edit, check and send from one place; slides reload when you save |
14
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) |
15
+ | `mdeck themes search`, `install <theme>`, `remove`, `update`, `list` | Themes: install more (each with its palette), remove the ones you do not use; see [Install, remove or share a theme](theme-repository.html) |
16
+ | `mdeck palettes search`, `install <palette>`, … | The same for palettes |
16
17
  | `mdeck design [my-talk.md or folder]` | Look at themes and palettes on a sample deck and fine-tune them; saves to `extensions/` |
17
18
  | `mdeck migrate my-talk.md --dry-run` | Preview the changes needed for API 2.0 |
18
19
  | `mdeck check my-talk.md` | Check settings and look for missing local files |
@@ -31,7 +32,7 @@ For how the commands, the views and the servers fit together, see [Views, comman
31
32
 
32
33
  - **Preview:** a small live copy of the deck to flip through; click it to open the audience window at that slide.
33
34
  - **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
+ - **Write and learn:** the visual editor, the theme editor (themes and palettes on a sample deck, see [Install, remove or share a theme](theme-repository.html)) and these guides. Each starts the first time you click it.
35
36
  - **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
37
  - **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
38
  - **Check:** the same problems `mdeck check` reports, such as missing pictures.
@@ -14,7 +14,7 @@ The rest of this page is the reference for what it writes, and for anyone comfor
14
14
 
15
15
  To look at the result and fine-tune it, run `mdeck design my-talk.md` (or `mdeck design` in a folder without a deck). It shows the theme or palette on a sample deck with every kind of slide, light and dark, and has forms for colours, fonts, sizes and spacing; see [Edit slides in your browser](editing.html). The files it writes are the ones described here.
16
16
 
17
- Someone may already have made what you need: `mdeck themes search` lists the theme repository, and [Install or share a theme](theme-repository.html) explains how to install a pack or share yours.
17
+ Someone may already have made what you need: `mdeck themes search` lists the theme repository, and [Install, remove or share a theme](theme-repository.html) explains how to install one or share yours.
18
18
 
19
19
  Themes and palettes are **extensions**: each one is a folder with an `extension.toml` file that says what it is. Slide layouts use the same idea. Put the folder in `extensions/` beside your slide file and mdeck finds it automatically; there is nothing to register. The [extensions reference](extensions.html) has the complete list of settings.
20
20
 
@@ -1,76 +1,88 @@
1
- # Install or share a theme
1
+ # Install, remove or share a theme
2
2
 
3
- Besides the themes and palettes that come with mdeck, other people share theirs in the **theme repository**: <https://github.com/tilman-schieber/mdeck-themes>. A shared theme or palette comes as a **pack**: one theme with the palettes made for it, or a set of palettes.
3
+ mdeck comes with four themes, `neue`, `academic`, `aurora` and `minimal`, and five palettes, `swiss`, `nordic`, `neon`, `paper` and `lagoon`. They work right away, also without an internet connection. More themes and palettes are in the **theme repository**; try every one on a sample deck, light and dark, at <https://gh.tschieber.de/mdeck-themes/>.
4
4
 
5
5
  ## Find and install one
6
6
 
7
- See what there is:
7
+ Themes and palettes each have their own command, with the same words:
8
8
 
9
9
  ```sh
10
10
  mdeck themes search
11
11
  mdeck themes search warm
12
+ mdeck palettes search
12
13
  ```
13
14
 
14
- Install a pack beside your slides:
15
+ Install a theme:
15
16
 
16
17
  ```sh
17
- mdeck themes install solarized my-talk.md
18
+ mdeck themes install duet
18
19
  ```
19
20
 
20
- It is copied into the `extensions` folder next to `my-talk.md`, like a theme you made yourself, so the slide folder keeps working on any computer. Then choose it in the deck settings (`palette: solarized`) or in the editor's **Deck** tab.
21
+ A theme comes with its default palette, so this installs the palette `cobalt` too. A palette installs on its own:
21
22
 
22
- The design page has the repository too: open it with `mdeck design my-talk.md`, and under **From the theme repository** press **Show what others made**. Each pack shows a picture and an **Install** button.
23
+ ```sh
24
+ mdeck palettes install solarized
25
+ ```
26
+
27
+ They are installed for every deck on this computer, in a folder in your home folder (`~/.mdeck/extensions`). Then choose one at the top of a slide file (`theme: duet`, `palette: solarized`) or in the editor's **Deck** tab.
28
+
29
+ The design page has the same: open it with `mdeck design`, choose **Show what you can install**, and press **Install** beside a theme or palette.
23
30
 
24
- ## For every deck
31
+ ## Beside one deck
25
32
 
26
- With `--global`, a pack is installed once for all your decks, in a folder in your home folder (`~/.mdeck/extensions`):
33
+ Give a slide file (or the folder it is in) to put it into the `extensions` folder next to it instead:
27
34
 
28
35
  ```sh
29
- mdeck themes install solarized --global
36
+ mdeck themes install duet my-talk.md
30
37
  ```
31
38
 
32
- A slide file that uses it works only on your computer. `mdeck check` reminds you, and `mdeck themes install solarized my-talk.md` puts a copy beside the slides. When a deck has its own copy, that one is used.
39
+ The slide folder then carries the theme and its palette, so it works on a computer where they are not installed, for example when you send the folder to a colleague.
33
40
 
34
41
  ## Update and remove
35
42
 
36
43
  ```sh
37
- mdeck themes list my-talk.md # what is installed, here and for every deck
38
- mdeck themes update my-talk.md # newer versions of everything installed here
39
- mdeck themes remove solarized my-talk.md
44
+ mdeck themes list # what comes with mdeck, and what is installed
45
+ mdeck themes update # newer versions of the installed themes
46
+ mdeck palettes update
47
+ mdeck themes remove duet
48
+ mdeck palettes remove cobalt
40
49
  ```
41
50
 
42
- Add `--global` to work on the packs for every deck. If you changed an installed file by hand, `update` and `remove` stop and tell you which one, so your change is not lost; add `--force` to go ahead anyway.
51
+ Add a slide file, or `--local`, to work beside that deck. If you changed an installed file by hand, `update` and `remove` stop and tell you which one, so your change is not lost; add `--force` to go ahead anyway.
43
52
 
44
- ## What a pack may contain
53
+ A palette that an installed theme uses by default stays until that theme is removed. A palette made for one theme only (like FHNW's `brand`) comes and goes with that theme.
45
54
 
46
- Packs hold only theme and palette settings (`extension.toml`) and theme stylesheets (`styles.css`). They never contain code that runs in your slides. Fonts may come only from Google Fonts or Bunny Fonts, and stylesheets may not load anything from the web. mdeck checks this again when it installs a pack, and refuses a pack that does not match the checksum the repository lists for it.
55
+ The themes and palettes that come with mdeck can be removed too: `mdeck themes remove aurora` hides it from every deck and from the lists, and `mdeck themes install aurora` brings it back, without the internet. The last theme always stays. A deck without a `theme:` setting uses `neue`; if you removed it, `mdeck check` tells you.
56
+
57
+ ## What may be in one
58
+
59
+ A theme holds only its settings (`extension.toml`) and its stylesheet (`styles.css`); a palette only its settings. They never contain code that runs in your slides. Fonts may come only from Google Fonts or Bunny Fonts, and stylesheets may not load anything from the web. mdeck checks this again when it installs one, and refuses one that does not match the checksum the repository lists for it.
47
60
 
48
61
  ## Share your own
49
62
 
50
63
  1. Make the theme or palette as described in [Create a theme or palette](theme-authoring.html), and fine-tune it with `mdeck design`.
51
- 2. Fork the theme repository and add a folder `packs/<your-pack>/` with a `pack.toml` and one folder per theme or palette:
64
+ 2. Fork the theme repository and add it as a folder of its own, `themes/<id>/` or `palettes/<id>/`:
52
65
 
53
66
  ```text
54
- packs/
67
+ themes/
55
68
  harbour/
56
- pack.toml
57
- harbour/ a theme
58
- extension.toml
59
- styles.css
60
- harbour-night/ its palette
61
- extension.toml
69
+ extension.toml
70
+ styles.css
71
+ palettes/
72
+ harbour-night/
73
+ extension.toml
62
74
  ```
63
75
 
76
+ with a few more settings at the top of `extension.toml`:
77
+
64
78
  ```toml
65
- schema = 1
66
- id = "harbour"
67
- title = "Harbour"
68
- description = "Navy and brass, with a serif for headings."
69
79
  version = "1.0.0"
70
80
  author = "Your Name"
71
81
  license = "MIT"
72
- mdeck = ">=2.3.0"
82
+ mdeck = ">=3.1.0"
73
83
  ```
74
84
 
75
- 3. Check it the way the repository will: `mdeck themes build packs -o site --check` shows every theme and palette in the pack on every kind of slide, light and dark, and fails on text that does not fit or is hard to read.
76
- 4. Open a pull request. Once it is merged, `mdeck themes search` lists it. For a new version, raise `version` in `pack.toml`.
85
+ A theme names its default palette (`palette = "harbour-night"`); it must be in the repository or come with mdeck, and is installed along with the theme.
86
+
87
+ 3. Check it the way the repository will: `mdeck themes build . -o site --check` shows every theme and palette on every kind of slide, light and dark, and fails on text that does not fit or is hard to read.
88
+ 4. Open a pull request. Once it is merged, `mdeck themes search` or `mdeck palettes search` lists it. For a new version, raise `version`.
@@ -1,5 +1,5 @@
1
1
  ---
2
- theme: editorial
2
+ theme: academic
3
3
  show:
4
4
  organization: none
5
5
  author: none
Binary file
Binary file
@@ -7,7 +7,7 @@ export const pages = [
7
7
  { slug: 'layouts', title: 'Choose a slide layout', group: 'Make your presentation', file: 'layouts.md', description: 'Choose a title slide, a big statement, a picture, or two columns.', preview: 'first-talk' },
8
8
  { slug: 'pictures-and-video', title: 'Add pictures and video', group: 'Make your presentation', file: 'media.md', description: 'Put an image or a video into your talk and keep its files together.' },
9
9
  { slug: 'appearance', title: 'Change the look', group: 'Make your presentation', file: 'appearance.md', description: 'Choose fonts and colors with themes and palettes.' },
10
- { slug: 'theme-repository', title: 'Install or share a theme', group: 'Make your presentation', file: 'theme-repository.md', description: 'Themes and palettes other people made, installed with one command, and how to share your own.' },
10
+ { slug: 'theme-repository', title: 'Install, remove or share a theme', group: 'Make your presentation', file: 'theme-repository.md', description: 'Packs of themes and palettes: those that come with mdeck, more from the theme repository, and how to share your own.' },
11
11
  { slug: 'notes-and-presenting', title: 'Add notes and present', group: 'Present and share', file: 'presenting.md', description: 'See your notes, reveal points one at a time, and open the audience screen.' },
12
12
  { slug: 'audience', title: 'Ask your audience', group: 'Present and share', file: 'audience.md', description: 'Polls that people answer on their phones, with live results on the slide.' },
13
13
  { slug: 'drawing', title: 'Draw on your slides', group: 'Present and share', file: 'drawing.md', description: 'Mark up slides with a pen or an iPad, live or ahead of time, and keep the drawings with the talk.' },
@@ -1,5 +1,5 @@
1
1
  ---
2
- theme: terminal
2
+ theme: neue
3
3
  meta:
4
4
  title: Deck-local layouts
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- theme: duet
2
+ theme: neue
3
3
  meta:
4
4
  title: "Ask the room"
5
5
  author: "Tilman Schieber"
@@ -1,11 +1,11 @@
1
1
  ---
2
- theme: sketch
2
+ theme: academic
3
3
  meta:
4
4
  title: "Introduction to Python"
5
5
  author: "Tilman Schieber"
6
6
  organization: "FHNW"
7
7
  date: "2026-05-19"
8
- palette: graphite
8
+ palette: paper
9
9
  ---
10
10
 
11
11
  ---
@@ -380,8 +380,8 @@ layout: split
380
380
  :::slot left
381
381
  ```markdown
382
382
  ---
383
- theme: editorial
384
- palette: terra
383
+ theme: aurora
384
+ palette: lagoon
385
385
  ---
386
386
  ```
387
387
  :::
@@ -392,7 +392,7 @@ To try them without changing the file, open the **reader view** and choose **Loo
392
392
  :::
393
393
 
394
394
  :::notes
395
- mdeck has six themes and ten palettes, each light or dark. `mdeck list` shows them all, including any kept in an `extensions` folder beside the deck.
395
+ mdeck has four built-in themes and five palettes, each light or dark. `mdeck list` shows them all, including any kept in an `extensions` folder beside the deck. `mdeck themes search` finds more in the theme repository.
396
396
  :::
397
397
 
398
398
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdeck",
3
- "version": "2.3.0",
3
+ "version": "3.1.0",
4
4
  "type": "module",
5
5
  "description": "Write slides as a plain text file, present them in the browser, share them as one HTML file or PDF.",
6
6
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "CHANGELOG.md"
41
41
  ],
42
42
  "scripts": {
43
- "test": "node --test",
43
+ "test": "node --test --import ./tests/isolate-home.js",
44
44
  "test:browser": "node tools/browser-check.mjs",
45
45
  "test:server": "node tools/server-check.mjs",
46
46
  "test:docs": "node tools/docs-check.mjs",
@@ -34,7 +34,7 @@ If `mdeck` is not installed, rely on the quick reference below.
34
34
  ```markdown
35
35
  ---
36
36
  theme: neue # theme id from `mdeck list themes`
37
- palette: terra # optional: lagoon, swiss, cobalt, nordic, graphite, terra, forest, ember, neon, phosphor, pastel
37
+ palette: nordic # optional: swiss, nordic, neon, lagoon, paper, or one installed from the theme repository (`mdeck themes search`)
38
38
  appearance: light # optional: light or dark
39
39
  meta:
40
40
  title: "Talk title"
@@ -135,7 +135,7 @@ Fix anything it reports. When you worked from source material, list what you lef
135
135
 
136
136
  ## 5. A new look: themes and palettes
137
137
 
138
- When the user wants a look the built-in themes and palettes do not give (their institute's colours, a font, the style of a poster or picture), first run `mdeck themes search` (with a word or two): someone may have shared it, and `mdeck themes install <pack> <deck>.md` puts it beside the deck. Otherwise make it as an extension in `extensions/` beside the deck, never as styling on single slides. Read `extensions.md` from the reference folder first; it lists every setting.
138
+ When the user wants a look the built-in themes and palettes do not give (their institute's colours, a font, the style of a poster or picture), first run `mdeck themes search` or `mdeck palettes search` (with a word or two): someone may have shared it, and `mdeck themes install <theme> <deck>.md` (with its palette) or `mdeck palettes install <palette> <deck>.md` puts it beside the deck, so the slide folder carries it. Otherwise make it as an extension in `extensions/` beside the deck, never as styling on single slides. Read `extensions.md` from the reference folder first; it lists every setting.
139
139
 
140
140
  - **Colours only: a palette.** `extensions/<id>/extension.toml` with `kind = "palette"`, and every colour role (`--bg`, `--surface`, `--ink`, `--ink-soft`, `--muted`, `--rule`, `--accent`, `--accent-2`, `--on-accent`) in both `[light]` and `[dark]`. Text colours must stay readable on `--bg` and `--surface` in both variants, because themes use the other variant for inverted slides.
141
141
  - **Fonts, sizes, spacing or arrangement: a theme.** Copy the folder of the closest built-in theme (`assets/extensions/themes/<id>/` in the mdeck repository or in `$(npm root -g)/mdeck/`) to `extensions/<new-id>/`, change `id` and `title`, then its tokens and `styles.css`. A theme takes no colours of its own: it names its default `palette`, and the colours come from palettes.