@treasure-ai/treasure-deck 2026.11.2 → 2026.11.4
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.
- package/dist/chrome.js +100 -25
- package/dist/chrome.js.map +1 -1
- package/dist/cli.js +57 -28
- package/dist/cli.js.map +1 -1
- package/dist/deckindex.d.ts +2 -1
- package/dist/deckindex.js +29 -12
- package/dist/deckindex.js.map +1 -1
- package/dist/deckstyle.js +6 -4
- package/dist/deckstyle.js.map +1 -1
- package/dist/dev.js +10 -1
- package/dist/dev.js.map +1 -1
- package/dist/host.d.ts +18 -0
- package/dist/host.js +28 -1
- package/dist/host.js.map +1 -1
- package/dist/import.d.ts +5 -1
- package/dist/import.js +9 -2
- package/dist/import.js.map +1 -1
- package/dist/slidesexport.d.ts +9 -3
- package/dist/slidesexport.js +13 -6
- package/dist/slidesexport.js.map +1 -1
- package/docs/commands.md +4 -3
- package/docs/editor.md +1 -1
- package/docs/syntax.md +1 -1
- package/package.json +1 -1
- package/runtime/embed.js +8 -3
- package/skills/treasure-deck/SKILL.md +3 -2
package/dist/slidesexport.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { captureDeck } from './deckstyle.js';
|
|
2
2
|
import { withMermaid } from './diagrams.js';
|
|
3
|
+
import { underHost } from './host.js';
|
|
3
4
|
import { googleToken } from './import.js';
|
|
4
5
|
import { DeckError } from './parse.js';
|
|
5
6
|
import { exportSlides, planSlides } from './slides.js';
|
|
@@ -17,7 +18,7 @@ export function slidesTarget(given, replace, meta) {
|
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* The plan for a built deck: as the page looks (rendered in Chrome), or from the Markdown alone with `plain` or
|
|
20
|
-
* without Chrome. Layouts are remade only where the presentation is new or replaced.
|
|
21
|
+
* without Chrome. Layouts are remade only where the presentation is new or replaced. `plain`: the plan is text only.
|
|
21
22
|
*/
|
|
22
23
|
export async function planDeckSlides(built, options = {}) {
|
|
23
24
|
const prefix = `deck${Date.now().toString(36)}`;
|
|
@@ -27,18 +28,24 @@ export async function planDeckSlides(built, options = {}) {
|
|
|
27
28
|
options.warn?.(`exporting the text only, in Google's layouts: couldn't render the deck (${e.message})`);
|
|
28
29
|
return undefined;
|
|
29
30
|
});
|
|
30
|
-
return captured ? planRendered(built, captured, prefix, { layouts: options.layouts }) : planSlides(built, prefix);
|
|
31
|
+
return captured ? { ...planRendered(built, captured, prefix, { layouts: options.layouts }), plain: false } : { ...planSlides(built, prefix), plain: true };
|
|
31
32
|
}
|
|
32
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Export a built deck to Google Slides with the user's Google sign-in; `created`: a new presentation was made;
|
|
35
|
+
* `plain`: only the text was exported (asked for, or the deck couldn't be rendered).
|
|
36
|
+
*/
|
|
33
37
|
export async function exportDeckSlides(built, options = {}) {
|
|
34
38
|
const { presentationId, replace } = slidesTarget(options.presentation, !!options.replace, built.deck.meta);
|
|
35
39
|
const plan = await planDeckSlides(built, { plain: options.plain, layouts: !presentationId || replace, warn: options.warn });
|
|
36
40
|
for (const w of plan.warnings)
|
|
37
41
|
options.warn?.(w);
|
|
38
42
|
const token = googleToken();
|
|
39
|
-
if (!token)
|
|
40
|
-
throw new DeckError(
|
|
43
|
+
if (!token) {
|
|
44
|
+
throw new DeckError(underHost()
|
|
45
|
+
? 'Google Slides needs the Google sign-in Treasure Work gives (DECK_GOOGLE_TOKEN), and gcloud\'s isn\'t used here: update Treasure Work, and connect Google Slides in Settings \u25b8 Connectors'
|
|
46
|
+
: 'Google Slides needs a Google sign-in: run gcloud auth login --enable-gdrive-access, or set DECK_GOOGLE_TOKEN (see deck slides --help)');
|
|
47
|
+
}
|
|
41
48
|
const { url } = await exportSlides(plan, { token, quotaProject: process.env.GOOGLE_CLOUD_QUOTA_PROJECT }, { presentationId, replace });
|
|
42
|
-
return { url, created: !presentationId, replaced: replace };
|
|
49
|
+
return { url, created: !presentationId, replaced: replace, plain: plan.plain };
|
|
43
50
|
}
|
|
44
51
|
//# sourceMappingURL=slidesexport.js.map
|
package/dist/slidesexport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slidesexport.js","sourceRoot":"","sources":["../src/slidesexport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAyB,EAAE,OAAgB,EAAE,IAAyB;IACjG,MAAM,MAAM,GAAG,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC;IACpC,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACvC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;IAClF,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAAkB,EAAE,OAAO,GAA6E,EAAE;IAC7I,MAAM,MAAM,GAAG,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;IAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK;QAC5B,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,MAAM,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAA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I,EAAE,CAAC,CAAC;IAC5H,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,SAAS,CAAC,SAAS,EAAE;YAC7B,CAAC,CAAC,+LAA+L;YACjM,CAAC,CAAC,uIAAuI,CAAC,CAAC;IAC/I,CAAC;IACD,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC;IACvI,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;AACjF,CAAC"}
|
package/docs/commands.md
CHANGED
|
@@ -83,6 +83,7 @@ deck slides talk.md --presentation <id> --replace # update one in place (its
|
|
|
83
83
|
deck slides talk.md --presentation <id> # add the slides after its own
|
|
84
84
|
deck slides talk.md --plain # text only, in Google's layouts
|
|
85
85
|
deck slides talk.md --dry-run # print the Slides API requests; calls nothing
|
|
86
|
+
deck slides talk.md --json # one line of JSON: url, created, plain, warnings
|
|
86
87
|
```
|
|
87
88
|
|
|
88
89
|
`deck slides` makes a Google Slides presentation that looks like the deck, for people who want to edit or comment on it in Slides. It renders each slide in headless Chrome (CHROME_PATH overrides). What the theme draws behind the content (its background, ornaments, and footer) goes on the presentation's layouts, one per kind of slide (title, section, content), with the title placeholder placed and styled as the deck's titles and the footer text on it; the master takes the content layout's background and the theme's colors and fonts. So a slide added in Slides looks like the deck's, and changing a layout in Slides changes all its slides. Each slide uses its layout, with its title in the placeholder. What its own content draws (cards and code panels, rules, images, diagrams) goes on it as pictures where the page has them. On top, the slide is laid out as a Slides author would: one text box per column, card, header, or code block, its blocks as paragraphs spaced and indented as on the page, lists as Slides lists, and tables as native tables with the page's column widths, header fill, and row rules. Every run keeps its font size, weight, and color; inline code keeps its tint as a highlight; gradient text is colored character by character along its gradient. Speaker notes come along. Page numbers are text on each slide: Slides can't put a layout's slide number on a slide it makes. Themes that drift a gradient across the deck have every slide's as on the first slide, so the slides of a layout share one.
|
|
@@ -95,7 +96,7 @@ A deck whose frontmatter names a presentation (`slides: <URL or ID>`) is exporte
|
|
|
95
96
|
|
|
96
97
|
`--replace` keeps the presentation's link and sharing: its slides are deleted and the new ones made, and its master and layouts take the deck's theme. Edits made in Slides are lost; the Markdown is the source. Without `--replace`, `--presentation` leaves the presentation's master and layouts alone (its other slides use them), so each added slide has its theme picture as its own background.
|
|
97
98
|
|
|
98
|
-
It signs in as `deck import` does: `$DECK_GOOGLE_TOKEN`, else gcloud's token (`gcloud auth login --enable-gdrive-access`). The token needs the `https://www.googleapis.com/auth/presentations` and `https://www.googleapis.com/auth/drive.file` scopes (`drive` covers both; `--plain` needs only `presentations`). With gcloud's token, Google also needs a project to bill the calls to: set `GOOGLE_CLOUD_QUOTA_PROJECT` to a Google Cloud project of yours with the Slides and Drive APIs enabled (`gcloud services enable slides.googleapis.com drive.googleapis.com --project <id>`).
|
|
99
|
+
It signs in as `deck import` does: `$DECK_GOOGLE_TOKEN`, else gcloud's token (`gcloud auth login --enable-gdrive-access`; never under Treasure Work, `DECK_HOST=ipc`, which gives its own). The token needs the `https://www.googleapis.com/auth/presentations` and `https://www.googleapis.com/auth/drive.file` scopes (`drive` covers both; `--plain` needs only `presentations`). With gcloud's token, Google also needs a project to bill the calls to: set `GOOGLE_CLOUD_QUOTA_PROJECT` to a Google Cloud project of yours with the Slides and Drive APIs enabled (`gcloud services enable slides.googleapis.com drive.googleapis.com --project <id>`).
|
|
99
100
|
|
|
100
101
|
## An index of decks: `deck index`
|
|
101
102
|
|
|
@@ -112,7 +113,7 @@ The list lives in `index.json` beside the decks, by default in `deck/` when that
|
|
|
112
113
|
|
|
113
114
|
- **From the deck:** its `source` (the `.md`, relative to the folder), title, `date:` (else the file's date), author, slide count, and a thumbnail of its first slide, written to `thumbnails/` as a 480 px JPEG. A thumbnail is captured again only when the deck's page changed.
|
|
114
115
|
- **The link:** the deck's `url:` frontmatter, else the entry's `url` as the file has it, else the deck's built page beside it (`talk.html`, from `deck build`). Treasure Work writes a deck's `url` here when it publishes it, so the index links the published page.
|
|
115
|
-
- **Kept as they are:** fields set by hand or by another tool (a `description`,
|
|
116
|
+
- **Kept as they are:** fields set by hand or by another tool (a `description`, a `scope`), and entries without a `source`, such as a talk published somewhere else. An entry whose deck is gone is dropped, with its thumbnail.
|
|
116
117
|
|
|
117
118
|
```json
|
|
118
119
|
{
|
|
@@ -129,7 +130,7 @@ The list lives in `index.json` beside the decks, by default in `deck/` when that
|
|
|
129
130
|
|
|
130
131
|
The editor's **All decks** button shows the index of the deck being edited, and opens its other decks ([Editor](editor.md#toolbar)).
|
|
131
132
|
|
|
132
|
-
A deck's frontmatter can set `thumbnail: 3` to show its third slide, and `description:` and `tags:`
|
|
133
|
+
A deck's frontmatter can set `thumbnail: 3` to show its third slide, and `description:` for its card. Its `tags:` are chips on the card and filters: a card shows when it has every selected tag, and removing `tags:` clears them from the index. Links must be `http(s)` URLs or relative paths; relative ones are relative to the manifest's folder, and `-o` into another folder adjusts them. The page title is the manifest's `title` (default "Decks"). Given a `.json` file instead of a folder, `deck index` only builds the page from it, inlining thumbnails given as paths relative to it: Treasure Work does this to publish an index that lists only the decks its audience may see.
|
|
133
134
|
|
|
134
135
|
## Importing a shared deck: `deck import`
|
|
135
136
|
|
package/docs/editor.md
CHANGED
|
@@ -59,7 +59,7 @@ Below the slide. Drag its top edge to resize it.
|
|
|
59
59
|
- The slide's style: **Dark slide** (or Light slide in a dark deck), **Fit to slide** (content and columns slides), and **No number** (section slides).
|
|
60
60
|
- **Preview** opens the deck as presented (`/present`) on the current slide in your system default browser. Its ▾ menu offers **Open in the browser**, **Copy link**, **Export PDF**, and **Export to Google Slides**.
|
|
61
61
|
- **Export PDF** saves the deck as `<deck>.pdf` next to its Markdown, the same file `deck pdf` makes, and opens it.
|
|
62
|
-
- **Export to Google Slides** exports the deck as [`deck slides`](commands.md#google-slides-preview-deck-slides) does and opens the presentation; it takes about a minute. The first export makes a new presentation and writes its link into the frontmatter (`slides:`, an edit you can undo), so later exports update that presentation in place, keeping its link and sharing. It needs the same Google sign-in as `deck slides`; without one, the message says what to run.
|
|
62
|
+
- **Export to Google Slides** exports the deck as [`deck slides`](commands.md#google-slides-preview-deck-slides) does and opens the presentation; it takes about a minute. The first export makes a new presentation and writes its link into the frontmatter (`slides:`, an edit you can undo), so later exports update that presentation in place, keeping its link and sharing. It needs the same Google sign-in as `deck slides`; without one, the message says what to run. In Treasure Work, the export uses the Google account connected there (Settings ▸ Connectors), never gcloud's.
|
|
63
63
|
- A deck that doesn't build isn't exported. The PDF needs Chrome; without it, the Google Slides export is text only, in Google's layouts. An editor framed in a host page, which keeps the edits itself, doesn't offer them.
|
|
64
64
|
- **All decks** shows when the deck belongs to a deck index (an `index.json` in its folder or a folder above it, kept by [`deck index`](commands.md#an-index-of-decks-deck-index)). It opens the index over the editor, as the file has it: run `deck index` to add new decks or refresh thumbnails. The deck you're editing is marked **Editing**; clicking it goes back to the editor. Click another deck to edit it: in Treasure Work it opens in the editor; elsewhere `deck editor` starts an editor on it and opens that in a new browser tab (clicking it again goes back to the same editor, and those editors stop when this one does). **Close** or Esc goes back to the editor. Only a `.md` inside the index's folder is ever opened, never a card's link.
|
|
65
65
|
- **Publish** (in Treasure Work) publishes the deck as a web page on Apps Script. Treasure Work builds it, asks who can open it the first time (only you, your organization, or anyone with the link), and deploys it with your Google account. After that the button reads **Update page**: it updates the same page, so a link you shared keeps working. Its ▾ menu opens the page or copies its link. A published page is a snapshot, so update it after you edit. Outside Treasure Work there is no Publish button.
|
package/docs/syntax.md
CHANGED
|
@@ -21,7 +21,7 @@ section_slides: true # show section divider slides (hidden by default)
|
|
|
21
21
|
toc: sidebar # show the table of contents column from the start (`t` toggles it)
|
|
22
22
|
parts: [01-intro.md, 02-arch.md] # continue the deck in more files
|
|
23
23
|
description: "A query language that reads top to bottom" # for its card in `deck index`
|
|
24
|
-
tags: [wvlet, sql] #
|
|
24
|
+
tags: [wvlet, sql] # tag chips and filters in `deck index`
|
|
25
25
|
thumbnail: 2 # the slide `deck index` shows (default: the first)
|
|
26
26
|
url: https://…/exec # where `deck index` links the deck (default: its built page)
|
|
27
27
|
slides: https://docs.google.com/presentation/d/…/edit # the presentation `deck slides` and the editor's export update
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treasure-ai/treasure-deck",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.4",
|
|
4
4
|
"description": "Markdown presentations without <div> markup: four layouts, themes, and a single-file HTML output that publishes to Apps Script",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://www.npmjs.com/package/@treasure-ai/treasure-deck",
|
package/runtime/embed.js
CHANGED
|
@@ -75,7 +75,10 @@
|
|
|
75
75
|
'.deck-doc .gap{display:none}.deck-doc .doc-blank{margin:0;min-height:1.55em;cursor:text}.deck-doc .doc-head{padding:0;color:var(--ed-fg);font:12px/16px ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre;outline:none;caret-color:var(--ed-accent)}' +
|
|
76
76
|
'.deck-doc .doc-sep.is-picked{color:var(--ed-accent-text)}.deck-doc .doc-sep.is-picked::after{border-top:2px solid var(--ed-accent)}.deck-doc .doc-sep:has(.doc-head)::after{display:none}' +
|
|
77
77
|
'.deck-doc .doc-col,.deck-md .md-stack{box-sizing:border-box;width:86%;margin:0 auto}' +
|
|
78
|
-
'
|
|
78
|
+
// On a narrow window the Markdown's gutter is padding on the textarea and its copy, not on their box: the textarea is
|
|
79
|
+
// laid over the box's padding too, so padding there would put its caret and line breaks off the text shown.
|
|
80
|
+
'@media (max-width:640px){.deck-doc .doc-col{width:100%;padding:0 14px}.deck-md .md-stack{width:100%}' +
|
|
81
|
+
'.deck-md .md-stack pre,.deck-md .md-stack textarea{padding-left:14px;padding-right:14px}}.deck-doc .slide-body{max-width:none}' +
|
|
79
82
|
'.deck-doc h1,.deck-doc h2,.deck-doc h3,.deck-doc h4{margin:.6em 0 .3em;line-height:1.25;color:var(--ed-fg)}.deck-doc h1{font-size:1.6em}.deck-doc h2{font-size:1.35em}.deck-doc h3{font-size:1.15em}' +
|
|
80
83
|
'.deck-doc p,.deck-doc ul,.deck-doc ol,.deck-doc blockquote,.deck-doc table,.deck-doc pre{margin:.45em 0}.deck-doc ul,.deck-doc ol{padding-left:1.5em}' +
|
|
81
84
|
'.deck-doc blockquote{margin-left:0;padding-left:12px;border-left:3px solid var(--ed-line-2);color:var(--ed-fg-2)}' +
|
|
@@ -1490,13 +1493,15 @@
|
|
|
1490
1493
|
}).then(function (r) {
|
|
1491
1494
|
if (r && r.reason === 'cancelled') return done();
|
|
1492
1495
|
if (!r || !r.ok) return done('Couldn\u2019t export to Google Slides: ' + ((r && r.reason) || 'unknown error'), 10000);
|
|
1493
|
-
|
|
1496
|
+
// A host that exports (Treasure Work) may add a notice: which account, or why only the text came along.
|
|
1497
|
+
var note = r.message ? ' \u2014 ' + r.message : '', ms = r.message ? 10000 : 0;
|
|
1498
|
+
if (!r.created) return done('Updated the Google Slides presentation' + note, ms || 4000);
|
|
1494
1499
|
// Quietly, so the toast says what was exported rather than "Saved".
|
|
1495
1500
|
submit(function () {
|
|
1496
1501
|
var f = mainFile(), lines = sourceLines(f), p = lines && core.setMeta(lines, 'slides', r.url);
|
|
1497
1502
|
if (p) p.file = f;
|
|
1498
1503
|
return p;
|
|
1499
|
-
}, function () { done('Exported to a new presentation; its link is now in the frontmatter (slides:)', 5000); }, true);
|
|
1504
|
+
}, function () { done('Exported to a new presentation; its link is now in the frontmatter (slides:)' + note, ms || 5000); }, true);
|
|
1500
1505
|
}, function (e) { done('Couldn\u2019t export to Google Slides: ' + e, 10000); });
|
|
1501
1506
|
}
|
|
1502
1507
|
|
|
@@ -61,6 +61,7 @@ A deck is CommonMark + GFM with the additions below. Anything unknown is a build
|
|
|
61
61
|
| `section_slides` | `true` shows section divider slides |
|
|
62
62
|
| `toc` | `sidebar` starts with the table-of-contents column (`t` toggles it) |
|
|
63
63
|
| `parts` | `[a.md, b.md]` continues the deck in more files, each starting a new slide |
|
|
64
|
+
| `tags` | `[planning, q3]`, a YAML list of lowercase, hyphenated tags, shown as chips on the deck's card and as filters in `deck index`. Keep them few and distinct: redundant tags make filtering harder |
|
|
64
65
|
|
|
65
66
|
### Slides and layouts
|
|
66
67
|
|
|
@@ -333,9 +334,9 @@ To list several decks on one page, run `deck index` from the workspace root. It
|
|
|
333
334
|
|
|
334
335
|
- **Where:** it works on `deck/` when that folder exists, else the current folder. Pass a folder to index another one; `-o <file>` writes the page elsewhere.
|
|
335
336
|
- **What it writes:** `deck/index.json`, one entry per deck keyed by its `.md` path, and `deck/index.html`, a single self-contained page. Each run adds every `deck: true` file under the folder and refreshes its title, `date`, `author`, slide count, and thumbnail. It captures a thumbnail again only when the deck's built page changes.
|
|
336
|
-
- **What it keeps:** entries without a `source` (added by hand), the `url
|
|
337
|
+
- **What it keeps:** entries without a `source` (added by hand), the `url` and `description` of a deck whose frontmatter doesn't set them, and the `starred` and `archived` marks. Tags always follow the frontmatter: removing or emptying `tags:` clears them from `index.json`. An entry whose deck is gone is dropped. A deck that doesn't build keeps its entry as it was, with a warning.
|
|
337
338
|
- **Link:** the deck's `url:` frontmatter, else the entry's `url`, else the deck's built page beside it. A deck with neither needs `deck build` first, or its card links to a missing page. After publishing a deck, set its entry's `url` in `deck/index.json` (or add `url:` to its frontmatter), then run `deck index` again.
|
|
338
|
-
- **Card:** `thumbnail: 3` shows slide 3 instead of the first; `description:` and `tags:`
|
|
339
|
+
- **Card:** `thumbnail: 3` shows slide 3 instead of the first; `description:` appears on the card, and each of its `tags:` is a chip on it. A chip and the matching button in the tag bar toggle the same tag, and a card shows only when it has every selected tag. Cards open in a new tab. The page title is the manifest's `title` (default "Decks").
|
|
339
340
|
- **Feature or retire:** `deck index --star <deck>` lists it under ★ Starred at the top; `--archive <deck>` moves it under an Archived button at the end, out of the count. `--unstar` and `--unarchive` undo them. The flags take the deck's `.md` or its folder, can repeat, and rebuild the page in the same run. A deck is starred or archived, never both.
|
|
340
341
|
- **Publish:** publish `deck/index.html` like a deck, with its own `artifact_id` for updates. To publish only some decks, write a manifest that lists just those and run `deck index <manifest.json>`: it builds the page from the manifest without rescanning, inlines the thumbnails, and writes `index.html` beside the manifest (or to `-o`).
|
|
341
342
|
- **Audience:** the index shows every listed deck's title and thumbnail, so give it an audience no wider than the narrowest deck it lists, or remove the entries that audience shouldn't see.
|