rshow 0.0.7 → 0.0.9
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/main.js +648 -82
- package/package.json +1 -1
- package/skills/rshow/SKILL.md +7 -5
- package/skills/rshow/reference/cli.md +13 -6
- package/skills/rshow/reference/dashboard.md +5 -5
- package/skills/rshow/reference/page-contract.md +2 -1
- package/skills/rshow/reference/pages.md +7 -7
- package/skills/rshow/reference/poster.md +5 -5
- package/skills/rshow/reference/project-page.md +5 -5
- package/skills/rshow/reference/reports.md +5 -5
- package/skills/rshow/reference/sketch.md +5 -5
- package/skills/rshow/reference/terminal.md +5 -5
- package/skills/rshow-slides/SKILL.md +8 -10
- package/worker/index.js +127 -76
- package/worker/migrations/0005_version_counters.sql +3 -0
- package/worker/migrations/0006_retired_slugs.sql +5 -0
package/package.json
CHANGED
package/skills/rshow/SKILL.md
CHANGED
|
@@ -20,7 +20,7 @@ Copy this checklist into the reply and tick it as you go.
|
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
22
|
- [ ] shape picked and outline or headings agreed
|
|
23
|
-
- [ ] page written, theme linked at
|
|
23
|
+
- [ ] page written, theme linked at `@latest`
|
|
24
24
|
- [ ] rshow check <dir> exits 0
|
|
25
25
|
- [ ] rshow preview <dir> looked at 360px wide and at desktop width
|
|
26
26
|
- [ ] audience confirmed with the person
|
|
@@ -30,7 +30,7 @@ Copy this checklist into the reply and tick it as you go.
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
1. Pick the shape and say it back in one sentence, such as a page, a report, a poster, a project page, a dashboard, a mockup, a sketch, a terminal page or a prerendered Astro or Vite site.
|
|
33
|
-
2. Write `index.html` in its own folder, link the theme at
|
|
33
|
+
2. Write `index.html` in its own folder, link the theme at `@latest` and keep every other path relative.
|
|
34
34
|
3. Run `rshow check <dir>`.
|
|
35
35
|
4. Fix every error, then run `rshow check` again until it exits 0.
|
|
36
36
|
5. Run `rshow preview <dir>` and open the printed `http://127.0.0.1:4321` link.
|
|
@@ -46,7 +46,10 @@ Copy this checklist into the reply and tick it as you go.
|
|
|
46
46
|
- Every path inside the artifact is relative, with no leading slash.
|
|
47
47
|
The only exceptions are `/_themes/...` and `/_data/...`.
|
|
48
48
|
- Link the theme, never copy it.
|
|
49
|
-
The stylesheet links and `mode.js` in the head all carry the same `<name
|
|
49
|
+
The stylesheet links and `mode.js` in the head all carry the same `<name>@latest`.
|
|
50
|
+
- Link `@latest`, so a theme fix reaches the page with no republish.
|
|
51
|
+
Write a number only when the person asks to freeze a page, such as a talk on the day it is given.
|
|
52
|
+
A page frozen on a number needs 8 or newer for math.
|
|
50
53
|
- The theme is the base, not a cage.
|
|
51
54
|
A page may carry one inline `<style>` block with its own classes and its own layouts when the content needs them.
|
|
52
55
|
Own CSS takes colour, type and space from the theme tokens with `var(--...)`, so light, dark, print and a theme swap keep working.
|
|
@@ -63,7 +66,6 @@ Copy this checklist into the reply and tick it as you go.
|
|
|
63
66
|
- A report links `report.css` and `report.js` in place of `page.css`, and `mode.js` still goes in the head.
|
|
64
67
|
Read [reports](reference/reports.md) before you write one.
|
|
65
68
|
- Math is LaTeX in the text of an element with the class `math`, and the page links `math.css` and `math.js` for it.
|
|
66
|
-
Math needs theme version 8 or newer, so a page on an older version moves up with `rshow config <dir>`.
|
|
67
69
|
A `div.math` is display math and any other element is inline.
|
|
68
70
|
A `$` in the prose is a price and is never read as math, so `$5` stays text.
|
|
69
71
|
Read [reports](reference/reports.md) for the markup an equation takes.
|
|
@@ -154,4 +156,4 @@ The short list above is a hard rule.
|
|
|
154
156
|
Write the LaTeX in an element with the class `math` and link `math.css` and `math.js`.
|
|
155
157
|
- Never create a second artifact with a `-v2` slug.
|
|
156
158
|
Publish the same slug again.
|
|
157
|
-
- Never delete an artifact
|
|
159
|
+
- Never delete a version, a theme or an artifact, and never drop a share, unless the person asks for it.
|
|
@@ -25,9 +25,10 @@ This file is the whole surface, both config files and the exit codes.
|
|
|
25
25
|
| `rshow check <file-or-dir>` | apply the page contract to the files a publish would upload |
|
|
26
26
|
| `rshow preview <dir>` | serve a folder on `127.0.0.1` for a look, offline |
|
|
27
27
|
| `rshow publish <file-or-dir>` | upload a folder, or one file as `index.html`, as a new version |
|
|
28
|
-
| `rshow config [dir] [--offline]` | print the merged config as JSON, with `theme`
|
|
28
|
+
| `rshow config [dir] [--offline]` | print the merged config as JSON, with `theme` as `<name>@latest` and, with the network, `theme_resolved` as the version it resolves to |
|
|
29
29
|
| `rshow init --url <admin-url> --art <viewer-url>` | write the global config file, with `--theme` and `--force` |
|
|
30
30
|
| `rshow doctor [dir]` | check node, config, token, api, art, theme and skills, one `ok\|warn\|fail` line each |
|
|
31
|
+
| `rshow upgrade [--check] [--version x.y.z] [--force]` | replace the single executable, or run `npm install -g` on an npm install, with another release |
|
|
31
32
|
| `rshow list` | list artifacts you own or that are shared with you, with `--project`, `--tag` and `--q` filters |
|
|
32
33
|
| `rshow show <slug>` | print the artifact, its versions, its shares, its project and its tags |
|
|
33
34
|
| `rshow share <slug>` | set the mode, or add and remove shares |
|
|
@@ -36,7 +37,7 @@ This file is the whole surface, both config files and the exit codes.
|
|
|
36
37
|
| `rshow tag <slug>` | add or remove tags on an artifact |
|
|
37
38
|
| `rshow handoff <slug>@v<n>` | write a design handoff folder from a published design |
|
|
38
39
|
| `rshow compare --against <dir>` | compare an implementation with that handoff folder |
|
|
39
|
-
| `rshow delete <slug> --yes` | delete an artifact |
|
|
40
|
+
| `rshow delete <slug> [--version n] [--force] --yes` | delete an artifact, or one version of it |
|
|
40
41
|
| `rshow theme new <name>` | write a preset folder that extends a built-in theme |
|
|
41
42
|
| `rshow theme check <dir>` | check a theme or preset folder against the token contract |
|
|
42
43
|
| `rshow theme preview <dir>` | build the theme, then serve its preview page on `127.0.0.1` |
|
|
@@ -51,6 +52,10 @@ This file is the whole surface, both config files and the exit codes.
|
|
|
51
52
|
`--help` on its own prints the general usage, and `--help` after a command prints that command.
|
|
52
53
|
`--json` is global and makes stdout the API reply, which is how a script reads a version number.
|
|
53
54
|
|
|
55
|
+
`rshow upgrade` moves an installed rshow to the newest release, or to the one `--version` names, and `--check` prints both versions and changes nothing.
|
|
56
|
+
It needs no config and no token, and a source checkout or an npx cache is named with the tool that owns it instead of being touched.
|
|
57
|
+
Run `rshow upgrade` only when the person asks for it.
|
|
58
|
+
|
|
54
59
|
Every flag takes `--flag value` or `--flag=value`.
|
|
55
60
|
`--add`, `--editor`, `--remove` and `--tag` accept several values in a row after one flag.
|
|
56
61
|
|
|
@@ -77,7 +82,7 @@ They are never errors, because a person may have a reason.
|
|
|
77
82
|
`--no-style` skips all of them, and `--json` prints the findings as data.
|
|
78
83
|
|
|
79
84
|
`--offline` skips every request the check would make, so it works on a plane and it never waits on the host.
|
|
80
|
-
A published page that links `/_themes/<name>@<n>/` needs the network to confirm
|
|
85
|
+
A published page that links `/_themes/<name>@<n>/` or `/_themes/<name>@latest/` needs the network to confirm the theme exists, so a `--offline` run reports those links as unchecked rather than as a pass.
|
|
81
86
|
|
|
82
87
|
`rshow publish` runs the check first and stops while there is an error, so a page that fails the contract does not go live.
|
|
83
88
|
`--no-check` skips that step.
|
|
@@ -90,7 +95,7 @@ rshow preview <dir> [--theme <dir>] [--offline] [--no-reload] [--port 4321]
|
|
|
90
95
|
```
|
|
91
96
|
|
|
92
97
|
It serves `<dir>` on `127.0.0.1`, prints `http://127.0.0.1:<port>` and keeps running until you stop it.
|
|
93
|
-
It works offline: `/_themes/<name>@<n>/`
|
|
98
|
+
It works offline: `/_themes/<name>@<n>/` and `/_themes/<name>@latest/` come from `--theme` when that folder is the theme, then from the built-in theme on disk, and only then from the art URL in the config, which `--offline` turns off.
|
|
94
99
|
A page that uses `<artifact>/_data/<key>` gets a local store for the session, and the page reloads by itself when a file changes, which `--no-reload` turns off.
|
|
95
100
|
|
|
96
101
|
## publish
|
|
@@ -174,8 +179,10 @@ Set the tags and the project in `rshow.json` when they are a fact about the fold
|
|
|
174
179
|
`rshow theme publish <dir> [--label l] [--build cmd]` needs a `theme.json` with a `name`, publishes the folder as `theme-<name>`, sets it public and prints `/_themes/<name>@<n>/`.
|
|
175
180
|
`rshow theme list` prints the theme artifacts and the version each one serves.
|
|
176
181
|
`rshow show <slug>` prints the artifact, its versions, its shares, its pin and its URLs.
|
|
177
|
-
`rshow delete <slug> --yes` deletes the artifact and every version.
|
|
182
|
+
`rshow delete <slug> --yes` deletes the artifact and every version, and `--version <n>` deletes only that version.
|
|
178
183
|
It needs `--yes`, and it needs a yes from the person.
|
|
184
|
+
A theme or a theme version also needs `--force`, because pages link to it.
|
|
185
|
+
A public version can stay visible for up to 5 minutes after the delete, and a theme file for longer, so tell the person this when they delete to take something down.
|
|
179
186
|
|
|
180
187
|
A preset is a small folder whose `theme.json` carries `"extends": "default"` and only token and font overrides.
|
|
181
188
|
`rshow theme new <name> [--dir <parent>] [--from default]` writes it with both modes pre-filled with the base values of `--bg`, `--fg`, `--muted`, `--accent` and `--layer-01`, and prints the path plus `next: rshow theme check <dir>`.
|
|
@@ -238,7 +245,7 @@ Later files win, and the environment beats both.
|
|
|
238
245
|
| `art` | the art base the preview proxies `/_themes/` to, set by `rshow init` or `RSHOW_ART`; without it a theme lookup is skipped with a warning |
|
|
239
246
|
| `slug` | the artifact to publish to, overridden by `--slug` |
|
|
240
247
|
| `title` | the human title, overridden by `--title` |
|
|
241
|
-
| `theme` | the theme a page should link: `<name>`, `<name>@latest` or a fixed `<name>@<n>`. `rshow config`
|
|
248
|
+
| `theme` | the theme a page should link: `<name>`, `<name>@latest` or a fixed `<name>@<n>`. Agents link `<name>@latest` and `rshow config` keeps it that way, with `theme_resolved` beside it when the lookup works |
|
|
242
249
|
| `tokens` | token overrides recorded and printed by `rshow config`. No command writes them into a page, so apply them by hand |
|
|
243
250
|
| `build` | the command `publish` runs in the folder first |
|
|
244
251
|
| `out` | the folder under `<dir>` to publish, default `dist` |
|
|
@@ -30,11 +30,11 @@ A dashboard that nobody filters is a report with extra steps.
|
|
|
30
30
|
<meta charset="utf-8">
|
|
31
31
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
32
32
|
<title>Write-ahead log, results per run</title>
|
|
33
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
34
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
35
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
36
|
-
<script src="/_themes/default@
|
|
37
|
-
<script defer src="/_themes/default@
|
|
33
|
+
<link rel="stylesheet" href="/_themes/default@latest/fonts.css">
|
|
34
|
+
<link rel="stylesheet" href="/_themes/default@latest/tokens.css">
|
|
35
|
+
<link rel="stylesheet" href="/_themes/default@latest/dashboard.css">
|
|
36
|
+
<script src="/_themes/default@latest/mode.js"></script>
|
|
37
|
+
<script defer src="/_themes/default@latest/dashboard.js"></script>
|
|
38
38
|
</head>
|
|
39
39
|
<body>
|
|
40
40
|
<div class="dashboard" data-src="results.csv" data-facet="workload"
|
|
@@ -8,7 +8,7 @@ It reads the files a publish would upload, so for a prerendered site it reads th
|
|
|
8
8
|
|
|
9
9
|
- One `index.html` at the root of the folder you publish.
|
|
10
10
|
- Every other path inside the artifact is relative and has no leading slash, such as `chart.svg`.
|
|
11
|
-
- The
|
|
11
|
+
- The root-relative prefixes are `/_themes/<name>@latest/`, `/_themes/<name>@<n>/` and `/_data/`, and all point at the host on purpose.
|
|
12
12
|
- At most 2000 files and 100 MiB per version, and at most 25 MiB per file.
|
|
13
13
|
- No theme file in the artifact.
|
|
14
14
|
No `deck.css`, no `page.css`, no font file, no `assets/` copy of a theme.
|
|
@@ -34,6 +34,7 @@ The theme files under `/_themes/` count as `'self'`, so a linked theme needs no
|
|
|
34
34
|
## CDN builds, pinned
|
|
35
35
|
|
|
36
36
|
Pin the exact version in the URL and never write `@latest` or a moving tag, which `rshow check` counts as an error.
|
|
37
|
+
A theme link is the one moving link that is allowed, so `/_themes/<name>@latest/` is right and a number is for a frozen page.
|
|
37
38
|
|
|
38
39
|
| Library | Pinned URL |
|
|
39
40
|
|---|---|
|
|
@@ -27,8 +27,8 @@ A single file published on its own becomes `index.html` and nothing else is uplo
|
|
|
27
27
|
|
|
28
28
|
## The skeleton
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
Every link
|
|
30
|
+
Link the theme at `@latest`, so a theme fix reaches the page with no republish. Write a number only when the person asks to freeze a page, such as a talk on the day it is given. A page frozen on a number needs 8 or newer for math.
|
|
31
|
+
Every link names the same theme on purpose, and all of them use `@latest` or all use the same number, because a mix of two versions renders somewhere between two designs.
|
|
32
32
|
|
|
33
33
|
```html
|
|
34
34
|
<!doctype html>
|
|
@@ -37,10 +37,10 @@ Every link carries the same version on purpose, because a mixed version renders
|
|
|
37
37
|
<meta charset="utf-8">
|
|
38
38
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
39
39
|
<title>Q3 latency report</title>
|
|
40
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
41
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
42
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
43
|
-
<script src="/_themes/default@
|
|
40
|
+
<link rel="stylesheet" href="/_themes/default@latest/fonts.css">
|
|
41
|
+
<link rel="stylesheet" href="/_themes/default@latest/tokens.css">
|
|
42
|
+
<link rel="stylesheet" href="/_themes/default@latest/page.css">
|
|
43
|
+
<script src="/_themes/default@latest/mode.js"></script>
|
|
44
44
|
<style>:root{--accent: #0f62fe;}</style>
|
|
45
45
|
</head>
|
|
46
46
|
<body>
|
|
@@ -164,7 +164,7 @@ Put the same thing in `rshow.json` when it should not be retyped:
|
|
|
164
164
|
{
|
|
165
165
|
"slug": "status",
|
|
166
166
|
"title": "Cluster status",
|
|
167
|
-
"theme": "default@
|
|
167
|
+
"theme": "default@latest",
|
|
168
168
|
"build": "npm run build",
|
|
169
169
|
"out": "dist"
|
|
170
170
|
}
|
|
@@ -37,12 +37,12 @@ The status line beside the buttons always names the width and the height, so the
|
|
|
37
37
|
<meta charset="utf-8">
|
|
38
38
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
39
39
|
<title>Immutable artifacts for reproducible figures</title>
|
|
40
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
41
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
42
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
43
|
-
<script src="/_themes/default@
|
|
40
|
+
<link rel="stylesheet" href="/_themes/default@latest/fonts.css">
|
|
41
|
+
<link rel="stylesheet" href="/_themes/default@latest/tokens.css">
|
|
42
|
+
<link rel="stylesheet" href="/_themes/default@latest/poster.css">
|
|
43
|
+
<script src="/_themes/default@latest/mode.js"></script>
|
|
44
44
|
<script defer src="https://cdn.jsdelivr.net/npm/qrcode-generator@1.4.4/qrcode.js"></script>
|
|
45
|
-
<script defer src="/_themes/default@
|
|
45
|
+
<script defer src="/_themes/default@latest/poster.js"></script>
|
|
46
46
|
</head>
|
|
47
47
|
<body>
|
|
48
48
|
|
|
@@ -38,11 +38,11 @@ Link `fonts.css`, `tokens.css` and `project.css`, then `mode.js` in the head and
|
|
|
38
38
|
<meta charset="utf-8">
|
|
39
39
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
40
40
|
<title>Immutable artifacts for reproducible figures</title>
|
|
41
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
42
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
43
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
44
|
-
<script src="/_themes/default@
|
|
45
|
-
<script defer src="/_themes/default@
|
|
41
|
+
<link rel="stylesheet" href="/_themes/default@latest/fonts.css">
|
|
42
|
+
<link rel="stylesheet" href="/_themes/default@latest/tokens.css">
|
|
43
|
+
<link rel="stylesheet" href="/_themes/default@latest/project.css">
|
|
44
|
+
<script src="/_themes/default@latest/mode.js"></script>
|
|
45
|
+
<script defer src="/_themes/default@latest/project.js"></script>
|
|
46
46
|
</head>
|
|
47
47
|
<body>
|
|
48
48
|
<div class="project">
|
|
@@ -35,11 +35,11 @@ Link `fonts.css`, `tokens.css` and `report.css`, then `mode.js` in the head and
|
|
|
35
35
|
<meta charset="utf-8">
|
|
36
36
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
37
37
|
<title>Publishing a folder as an immutable artifact</title>
|
|
38
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
39
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
40
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
41
|
-
<script src="/_themes/default@
|
|
42
|
-
<script defer src="/_themes/default@
|
|
38
|
+
<link rel="stylesheet" href="/_themes/default@latest/fonts.css">
|
|
39
|
+
<link rel="stylesheet" href="/_themes/default@latest/tokens.css">
|
|
40
|
+
<link rel="stylesheet" href="/_themes/default@latest/report.css">
|
|
41
|
+
<script src="/_themes/default@latest/mode.js"></script>
|
|
42
|
+
<script defer src="/_themes/default@latest/report.js"></script>
|
|
43
43
|
</head>
|
|
44
44
|
<body>
|
|
45
45
|
<div class="report">
|
|
@@ -23,11 +23,11 @@ A sketch is also the honest shape for a workshop, where a tidy drawing would end
|
|
|
23
23
|
## Markup
|
|
24
24
|
|
|
25
25
|
```html
|
|
26
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
27
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
28
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
29
|
-
<script src="/_themes/default@
|
|
30
|
-
<script defer src="/_themes/default@
|
|
26
|
+
<link rel="stylesheet" href="/_themes/default@latest/fonts.css">
|
|
27
|
+
<link rel="stylesheet" href="/_themes/default@latest/tokens.css">
|
|
28
|
+
<link rel="stylesheet" href="/_themes/default@latest/sketch.css">
|
|
29
|
+
<script src="/_themes/default@latest/mode.js"></script>
|
|
30
|
+
<script defer src="/_themes/default@latest/sketch.js"></script>
|
|
31
31
|
...
|
|
32
32
|
<div class="sketch" data-src="drawing.excalidraw" data-store="sketch-main"></div>
|
|
33
33
|
```
|
|
@@ -26,11 +26,11 @@ The viewer and the TUI kit are the theme's, and both are guided kits: the frame
|
|
|
26
26
|
## The viewer
|
|
27
27
|
|
|
28
28
|
```html
|
|
29
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
30
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
31
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
32
|
-
<script src="/_themes/default@
|
|
33
|
-
<script defer src="/_themes/default@
|
|
29
|
+
<link rel="stylesheet" href="/_themes/default@latest/fonts.css">
|
|
30
|
+
<link rel="stylesheet" href="/_themes/default@latest/tokens.css">
|
|
31
|
+
<link rel="stylesheet" href="/_themes/default@latest/terminal.css">
|
|
32
|
+
<script src="/_themes/default@latest/mode.js"></script>
|
|
33
|
+
<script defer src="/_themes/default@latest/terminal.js"></script>
|
|
34
34
|
...
|
|
35
35
|
<figure class="terminal" data-mode="ansi" data-src="capture.ans"
|
|
36
36
|
data-cols="100" data-rows="30" data-title="procview" data-palette="default"></figure>
|
|
@@ -32,8 +32,7 @@ A topic on its own is not a slide.
|
|
|
32
32
|
|
|
33
33
|
## 2. Skeleton
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
Math needs theme version 8 or newer, so a page on an older version moves up with `rshow config <dir>`.
|
|
35
|
+
Link the theme at `@latest`, so a theme fix reaches the deck with no republish. Write a number only when the person asks to freeze a deck, such as a talk on the day it is given. A deck frozen on a number needs 8 or newer for math.
|
|
37
36
|
|
|
38
37
|
```html
|
|
39
38
|
<!doctype html>
|
|
@@ -42,12 +41,12 @@ Math needs theme version 8 or newer, so a page on an older version moves up with
|
|
|
42
41
|
<meta charset="utf-8">
|
|
43
42
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
44
43
|
<title>Talk title</title>
|
|
45
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
46
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
47
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
44
|
+
<link rel="stylesheet" href="/_themes/default@latest/fonts.css">
|
|
45
|
+
<link rel="stylesheet" href="/_themes/default@latest/tokens.css">
|
|
46
|
+
<link rel="stylesheet" href="/_themes/default@latest/deck.css">
|
|
48
47
|
<!-- a deck that writes math links these two, and math.js goes before deck.js -->
|
|
49
|
-
<link rel="stylesheet" href="/_themes/default@
|
|
50
|
-
<script defer src="/_themes/default@
|
|
48
|
+
<link rel="stylesheet" href="/_themes/default@latest/math.css">
|
|
49
|
+
<script defer src="/_themes/default@latest/math.js"></script>
|
|
51
50
|
</head>
|
|
52
51
|
<body>
|
|
53
52
|
<main class="deck">
|
|
@@ -69,13 +68,12 @@ Math needs theme version 8 or newer, so a page on an older version moves up with
|
|
|
69
68
|
</section>
|
|
70
69
|
|
|
71
70
|
</main>
|
|
72
|
-
<script src="/_themes/default@
|
|
71
|
+
<script src="/_themes/default@latest/deck.js"></script>
|
|
73
72
|
</body>
|
|
74
73
|
</html>
|
|
75
74
|
```
|
|
76
75
|
|
|
77
|
-
The three stylesheet links and the script carry
|
|
78
|
-
A fallback to `default@3` keeps the page readable but has no math, so a deck on that version links neither `math.css` nor `math.js`, and the `math.js` warning of `rshow check` is the sign to move up.
|
|
76
|
+
The three stylesheet links and the script carry `@latest` on purpose, so a theme fix reaches every deck on the next open.
|
|
79
77
|
The deck needs no `mode.js`, because `deck.js` reads the same key and `t` does the same work.
|
|
80
78
|
Override a token in one `:root` block after the theme links when the deck needs its own accent, with no limit on the declarations.
|
|
81
79
|
An inline `<style>` block after the theme links may also carry a layout of the deck's own, as section 3 says.
|