|
10 | 10 |
|
11 | 11 | A dark mode UI for {url-antora}[Antora] documentation sites. |
12 | 12 |
|
13 | | -IMPORTANT: Use the GitHub release `ui-bundle.zip` (Default UI + this theme, pre-merged)—the habit every site should adopt. |
14 | | -The npm package is *deprecated and unpublished*; see xref:npm-deprecation.adoc[npm deprecation (archive & lessons learned)]. |
15 | | -Discover this theme via link:https://antora-supplemental.github.io/docs/[Antora Supplemental docs] (extensions registry). |
| 13 | +IMPORTANT: Install dark mode as a *supplemental overlay* or slot-based ui-module — it must not occupy `ui.bundle` when you mix it with another theme. |
| 14 | +GitHub `ui-bundle.zip` is a *convenience* artifact (Default UI + dark mode pre-merged) for quick starts only. |
| 15 | +npm is optional overlay transport — see xref:npm-distribution.adoc[npm distribution]. |
| 16 | +Discover this extension via link:https://antora-supplemental.github.io/docs/[Antora Supplemental docs] (extensions registry). |
16 | 17 |
|
17 | 18 | image:https://img.shields.io/badge/license-MIT-blue.svg[License: MIT] |
18 | 19 | image:https://img.shields.io/badge/antora-3.x-purple.svg[Antora 3.x] |
@@ -41,35 +42,45 @@ If you'd like to see native dark mode support in Antora, please upvote the featu |
41 | 42 |
|
42 | 43 | Your support helps the Antora team prioritize this feature! |
43 | 44 |
|
44 | | -**Doc-site chrome** (mast, header layout, VCS icons) lives in the separate link:https://github.com/antora-supplemental/valentus-theme[valentus-theme] project. Pair valentus supplemental UI on top of this dark-mode release bundle when you want both. |
| 45 | +**Doc-site chrome** (mast, header layout, VCS icons) lives in link:https://github.com/antora-supplemental/valentus-theme[valentus-theme]. |
| 46 | +Pair dark mode as overlay or ui-module on top of the *valentus* `ui.bundle` — not the other way around. |
45 | 47 |
|
46 | 48 | == Quick Start |
47 | 49 |
|
48 | | -Use the release bundle. That is the correct default—not a mild preference. |
| 50 | +=== Overlay on your theme bundle (recommended) |
49 | 51 |
|
50 | | -=== The habit: release `ui-bundle.zip` |
51 | | - |
52 | | -Point your playbook at a pinned GitHub Release asset. |
53 | | -You do not need this project on npm. |
| 52 | +Reserve `ui.bundle` for your theme. Layer dark mode via one `supplemental_files` directory: |
54 | 53 |
|
55 | 54 | [source,yaml] |
56 | 55 | ---- |
57 | 56 | ui: |
58 | 57 | bundle: |
59 | | - url: https://github.com/antora-supplemental/antora-dark-mode/releases/download/v1.2.0/ui-bundle.zip |
| 58 | + url: https://github.com/antora-supplemental/valentus-theme/releases/download/v1/ui-bundle.zip |
60 | 59 | snapshot: true |
61 | | - supplemental_files: ./supplemental-ui-overrides |
| 60 | + supplemental_files: ./site/supplemental-ui # merge antora-dark-mode supplemental-ui here |
62 | 61 | ---- |
63 | 62 |
|
64 | | -Optional `supplemental_files` is *one* directory of your files (logo, favicon)—not a second theme install. |
| 63 | +npm transport: `pnpm add -D antora-dark-mode` then copy from `node_modules/antora-dark-mode/supplemental-ui`. |
| 64 | +See xref:installation.adoc[Installation] and xref:ui-modules.adoc[UI Modules] (slot-based, no partial collisions). |
65 | 65 |
|
66 | | -Catalog and org docs: link:https://antora-supplemental.github.io/docs/[antora-supplemental.github.io/docs^]. |
| 66 | +=== Convenience `ui-bundle.zip` (Default UI only) |
67 | 67 |
|
68 | | -Former npm consumers: xref:npm-deprecation.adoc[npm deprecation]. |
| 68 | +Pre-merged Default UI + dark mode — use only when you do not need another theme in `ui.bundle`: |
| 69 | + |
| 70 | +[source,yaml] |
| 71 | +---- |
| 72 | +ui: |
| 73 | + bundle: |
| 74 | + url: https://github.com/antora-supplemental/antora-dark-mode/releases/download/v1.2.0/ui-bundle.zip |
| 75 | + snapshot: true |
| 76 | + supplemental_files: ./supplemental-ui-overrides |
| 77 | +---- |
69 | 78 |
|
70 | 79 | WARNING: Antora accepts *one* supplemental directory *or* virtual files—not multiple directories in YAML. |
71 | 80 |
|
72 | | -See link:examples/antora-playbook.yml[`examples/antora-playbook.yml`]. |
| 81 | +Examples: link:examples/antora-playbook-overlay.yml[`antora-playbook-overlay.yml`] (overlay), link:examples/antora-playbook-ui-modules.yml[`antora-playbook-ui-modules.yml`] (slots), link:examples/antora-playbook-convenience-bundle.yml[`antora-playbook-convenience-bundle.yml`] (Default UI quick start). |
| 82 | + |
| 83 | +Catalog and org docs: link:https://antora-supplemental.github.io/docs/[antora-supplemental.github.io/docs^]. |
73 | 84 |
|
74 | 85 | === Version pinning (production vs. rolling lines) |
75 | 86 |
|
@@ -165,22 +176,26 @@ See the dark theme in action: {url-demo}[Live Demo] |
165 | 176 | [source] |
166 | 177 | ---- |
167 | 178 | antora-dark-mode/ |
168 | | -├── supplemental-ui/ |
169 | | -│ ├── css/ |
170 | | -│ │ └── site-extra.css # Dark mode CSS styles |
171 | | -│ ├── js/ |
172 | | -│ │ └── site-dark-mode.js # Toggle button logic and theme management |
173 | | -│ └── partials/ |
174 | | -│ ├── footer-scripts.hbs # Loads the dark mode script |
175 | | -│ └── head-meta.hbs # Loads CSS and prevents FOUC |
176 | | -├── docs/ # Demo documentation |
| 179 | +├── supplemental-ui/ # Direct overlay install (merge into one supplemental dir) |
| 180 | +│ ├── css/site-extra.css |
| 181 | +│ ├── js/site-dark-mode.js |
| 182 | +│ └── partials/ # head-meta, footer-scripts (full replace — use ui-module for themes) |
| 183 | +├── ui-modules/ # Slot-based dark-mode module (recommended with valentus orchestrator) |
| 184 | +│ ├── registry.json5 |
| 185 | +│ ├── recipes/dark-mode-only.json5 |
| 186 | +│ └── packages/dark-mode/ |
| 187 | +│ ├── ui-module.json5 |
| 188 | +│ └── ui/ |
| 189 | +├── docs/ |
177 | 190 | │ ├── antora.yml # Component descriptor |
178 | 191 | │ └── modules/ROOT/ |
179 | 192 | │ ├── nav.adoc # Navigation |
180 | 193 | │ └── pages/ # Sample pages |
181 | 194 | ├── examples/ |
182 | | -│ ├── antora-playbook.yml # Example playbook (release bundle; recommended) |
183 | | -│ └── antora-playbook-local.yml # Example playbook (bundle + optional overrides) |
| 195 | +│ ├── antora-playbook-overlay.yml # Overlay on theme bundle (recommended) |
| 196 | +│ ├── antora-playbook-ui-modules.yml # Slot-based via orchestrator |
| 197 | +│ ├── antora-playbook-convenience-bundle.yml # Default UI quick start |
| 198 | +│ └── antora-playbook.yml # Alias for convenience bundle |
184 | 199 | ├── .github/workflows/ |
185 | 200 | │ └── deploy.yml # GitHub Pages deployment |
186 | 201 | ├── antora-playbook.yml # Playbook for demo site (online / CI) |
|
0 commit comments