Skip to content

Commit 445809a

Browse files
Refactor overlay-first install with ui-module slots and valentus v1 pin docs.
Slipstream dark mode no longer occupies ui.bundle; document valentus-theme as the full-stack successor with rolling v1 pin for former antora-dark-theme sites. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2d27cd3 commit 445809a

33 files changed

Lines changed: 2375 additions & 202 deletions

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ jobs:
7676
env:
7777
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7878

79+
- name: Publish to npm
80+
if: github.ref_name =~ /^v\d+\.\d+\.\d+$/ && !contains(github.ref_name, '-')
81+
env:
82+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
83+
run: |
84+
pnpm ui-modules:sync
85+
pnpm ui-modules:validate
86+
node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));delete p.private;fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n')"
87+
npm publish --access public
88+
npm deprecate antora-dark-theme@* "Renamed — use valentus-theme (bundled dark mode). See https://github.com/antora-supplemental/valentus-theme" || true
89+
7990
- name: Resolve release commit
8091
id: rel
8192
run: echo "sha=$(git rev-list -n 1 "${GITHUB_REF}")" >> "$GITHUB_OUTPUT"

CHANGELOG.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version
88

99
Entries below are in **chronological order** by date: prior release, then the **2026-03-04** org creation and repository move, then the next release.
1010

11+
== [1.3.0] - 2026-06-13
12+
13+
* *npm:* First publish as `antora-dark-mode` (overlay transport: `supplemental-ui/` + `ui-modules/`). Deprecate legacy `antora-dark-theme` npm package name.
14+
* *Install model:* Overlay-first and slot-based `dark-mode` ui-module; `ui-bundle.zip` is convenience-only (Default UI quick start).
15+
* *UI module:* `ui-modules/packages/dark-mode` with `head`/`foot` slots (no partial replace).
16+
17+
link:changelog-details/2026-06-13%20-%20overlay-first%20install%20and%20ui-module.adoc[Detailed notes — 2026-06-13]
18+
1119
== [Unreleased]
1220

1321
== [1.2.0] - 2026-06-09

README.adoc

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010

1111
A dark mode UI for {url-antora}[Antora] documentation sites.
1212

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).
1617

1718
image:https://img.shields.io/badge/license-MIT-blue.svg[License: MIT]
1819
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
4142

4243
Your support helps the Antora team prioritize this feature!
4344

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.
4547

4648
== Quick Start
4749

48-
Use the release bundle. That is the correct default—not a mild preference.
50+
=== Overlay on your theme bundle (recommended)
4951

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:
5453

5554
[source,yaml]
5655
----
5756
ui:
5857
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
6059
snapshot: true
61-
supplemental_files: ./supplemental-ui-overrides
60+
supplemental_files: ./site/supplemental-ui # merge antora-dark-mode supplemental-ui here
6261
----
6362

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).
6565

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)
6767

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+
----
6978

7079
WARNING: Antora accepts *one* supplemental directory *or* virtual files—not multiple directories in YAML.
7180

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^].
7384

7485
=== Version pinning (production vs. rolling lines)
7586

@@ -165,22 +176,26 @@ See the dark theme in action: {url-demo}[Live Demo]
165176
[source]
166177
----
167178
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/
177190
│ ├── antora.yml # Component descriptor
178191
│ └── modules/ROOT/
179192
│ ├── nav.adoc # Navigation
180193
│ └── pages/ # Sample pages
181194
├── 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
184199
├── .github/workflows/
185200
│ └── deploy.yml # GitHub Pages deployment
186201
├── antora-playbook.yml # Playbook for demo site (online / CI)

README.md

Lines changed: 25 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,51 @@
1-
# DEPRECATED — do not install
1+
# antora-dark-mode
22

3-
**This npm package is retired.** It will not receive updates. New documentation sites must not add `antora-dark-mode` as a dependency.
3+
Dark mode supplemental UI for Antora — overlay install or slot-based ui-module.
44

5-
If the yellow deprecation banner above this README is hard to read (npm dark theme), **use this README instead** — it is the authoritative migration notice.
5+
**Does not occupy `ui.bundle`** when mixed with valentus or other themes. See [Installation](https://antora-supplemental.github.io/antora-dark-mode/antora-dark-mode/guide/installation.html).
66

77
---
88

9-
## Why you should not use npm for this theme
9+
## Install (overlay — recommended)
1010

11-
Antora Dark Theme is a **static UI bundle** (CSS, Handlebars, JavaScript), not a Node library. Installing it from npm:
12-
13-
- Adds a useless entry to your `package.json` and lockfile
14-
- Encourages invalid setups (multiple `supplemental_files` directories, copy/sync scripts from `node_modules`)
15-
- Duplicates what the official release artifact already ships
16-
17-
The **correct habit** is a single pinned URL in your Antora playbook—no `npm install`.
18-
19-
---
20-
21-
## What to do instead (correct instructions)
22-
23-
### 1. Use the GitHub release UI bundle
24-
25-
In `antora-playbook.yml`:
11+
```bash
12+
pnpm add -D antora-dark-mode
13+
```
2614

2715
```yaml
2816
ui:
2917
bundle:
30-
url: https://github.com/antora-supplemental/antora-dark-mode/releases/download/v1.2.0/ui-bundle.zip
18+
url: https://github.com/antora-supplemental/valentus-theme/releases/download/v1/ui-bundle.zip
3119
snapshot: true
20+
supplemental_files: ./site/supplemental-ui # merge node_modules/antora-dark-mode/supplemental-ui
3221
```
3322
34-
Pin an exact semver tag for production. See [Version Pinning](https://antora-supplemental.github.io/antora-dark-mode/antora-dark-mode/guide/version-pinning.html) for `releases/latest`, rolling line tags (`v1.0`, `v1`), and Renovate.
35-
36-
### 2. Optional branding (one directory only)
23+
For slot-based installs (no partial collisions), see [UI Modules](https://antora-supplemental.github.io/antora-dark-mode/antora-dark-mode/guide/ui-modules.html).
3724
38-
```yaml
39-
supplemental_files: ./supplemental-ui-overrides # e.g. img/logo.svg
40-
```
25+
## Convenience bundle (Default UI only)
4126
42-
### 3. Remove this package if it is already installed
27+
Pre-merged `ui-bundle.zip` — quick start when you do not use another theme in `ui.bundle`:
4328

44-
```bash
45-
pnpm remove -D antora-dark-mode
46-
# or: npm uninstall antora-dark-mode
29+
```yaml
30+
ui:
31+
bundle:
32+
url: https://github.com/antora-supplemental/antora-dark-mode/releases/download/v1.2.0/ui-bundle.zip
33+
snapshot: true
4734
```
4835

49-
Delete any `prebuild` / `sync:ui` scripts that copied `node_modules/antora-dark-mode/supplemental-ui`.
36+
## npm registry
5037

51-
---
38+
Republishing to npm as **overlay transport** (not `ui.bundle` replacement). Same package name `antora-dark-mode` — npm does not support renaming packages. See [npm distribution](https://antora-supplemental.github.io/antora-dark-mode/antora-dark-mode/guide/npm-distribution.html).
5239

53-
## Where to find full documentation
40+
## Links
5441

5542
| Resource | URL |
5643
|----------|-----|
57-
| **Install guide & lessons learned** | [npm deprecation (Antora site)](https://antora-supplemental.github.io/antora-dark-mode/antora-dark-mode/guide/npm-deprecation.html) |
58-
| **Live demo** | [antora-supplemental.github.io/antora-dark-mode](https://antora-supplemental.github.io/antora-dark-mode) |
59-
| **Extensions catalog (org hub)** | [antora-supplemental.github.io/docs](https://antora-supplemental.github.io/docs/) |
60-
| **Source repository** | [github.com/antora-supplemental/antora-dark-mode](https://github.com/antora-supplemental/antora-dark-mode) |
61-
| **Example playbook** | [examples/antora-playbook.yml](https://github.com/antora-supplemental/antora-dark-mode/blob/main/examples/antora-playbook.yml) |
62-
63-
---
44+
| Install guide | [installation.adoc](docs/modules/guide/pages/installation.adoc) |
45+
| UI modules | [ui-modules.adoc](docs/modules/guide/pages/ui-modules.adoc) |
46+
| Live demo | [antora-supplemental.github.io/antora-dark-mode](https://antora-supplemental.github.io/antora-dark-mode) |
47+
| Source | [github.com/antora-supplemental/antora-dark-mode](https://github.com/antora-supplemental/antora-dark-mode) |
6448

6549
## License
6650

67-
[MIT](https://github.com/antora-supplemental/antora-dark-mode/blob/main/LICENSE)
51+
[MIT](LICENSE)

antora-playbook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ content:
1212
branches: HEAD
1313
start_path: docs
1414

15-
# This repo builds the demo site from ./supplemental-ui (theme sources).
16-
# Consumers should use the release ui-bundle.zip — see README and examples/.
15+
# This repo's demo uses overlay install (Default UI + ./supplemental-ui).
16+
# Consumers: overlay on your theme bundle, ui-module slots, or convenience ui-bundle.zip — see README.
1717
ui:
1818
bundle:
1919
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
= 2026-06-13 — overlay-first install and slot-based dark-mode ui-module
2+
:description: Changelog detail for antora-dark-mode unreleased overlay restore
3+
:navtitle: Overlay-first install restore
4+
5+
* *Problem:* Bundle-only install docs (May 2026) made `antora-dark-mode` occupy `ui.bundle`, blocking theme mixing (e.g. valentus `ui-bundle` + dark mode).
6+
* *Fix:* Installation is overlay-first — theme owns `ui.bundle`; dark mode via `supplemental-ui` merge or `ui-modules/packages/dark-mode` slots.
7+
* *UI module:* `dark-mode` manifest uses `slots.head` (CSS + FOUC) and `slots.foot` (toggle JS); does not `replace` theme partials. Works with valentus `ui-orchestrator`.
8+
* *Convenience artifact:* GitHub `ui-bundle.zip` remains for Default UI quick starts only.
9+
* *npm:* Republish plan restores `antora-dark-mode` on npm as transport (`supplemental-ui` + `ui-modules`). Package rename on npm is not possible — reuse the existing name.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Antora Zulip — correction messages (antora-dark-theme → valentus-theme)
2+
3+
Post these in [Antora Zulip](https://antora.zulipchat.com/) where older threads still reference `antora-dark-theme`.
4+
5+
---
6+
7+
## Short correction (reply to outdated install advice)
8+
9+
The monolithic **`antora-dark-theme`** package was split and renamed:
10+
11+
| Former | Use instead |
12+
|---|---|
13+
| `antora-dark-theme` (npm / GitHub) | **`valentus-theme`** — release `ui-bundle.zip` (chrome + **bundled dark mode**) |
14+
| Dark mode only on another theme | **`antora-dark-mode`** — slipstream overlay (does not use `ui.bundle`) |
15+
16+
```yaml
17+
ui:
18+
bundle:
19+
url: https://github.com/antora-supplemental/valentus-theme/releases/download/v1/ui-bundle.zip
20+
snapshot: true
21+
supplemental_files: ./supplemental-ui-overrides # optional branding
22+
```
23+
24+
Docs: https://antora-supplemental.github.io/valentus-theme/
25+
26+
---
27+
28+
## Thread: npm install
29+
30+
```bash
31+
# Former (retired)
32+
pnpm add -D antora-dark-theme
33+
34+
# Full theme + dark mode (most former antora-dark-theme sites)
35+
# Use release bundle URL in playbook — no npm required.
36+
# Or: pnpm add -D valentus-theme for supplemental vendoring.
37+
38+
# Dark mode only on a custom theme bundle
39+
pnpm add -D antora-dark-mode
40+
```
41+
42+
---
43+
44+
## Thread: doc-site chrome + dark mode
45+
46+
Both ship in **valentus-theme** `ui-bundle.zip` since v1.1.0. You do not need to pin `antora-dark-mode` as `ui.bundle` and layer valentus on top.
47+
48+
---
49+
50+
## GitLab Default UI issue #216
51+
52+
Community extension: https://github.com/antora-supplemental/valentus-theme (full stack) or https://github.com/antora-supplemental/antora-dark-mode (overlay only).
53+
54+
Please update bookmarks and playbook URLs from `antora-dark-theme` to `valentus-theme`.

docs/maintainers/npm-registry-notice.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# npm: web deprecate + final patch publish (use both)
22

3+
> **Update (2026-06-13):** npm is being **restored** as overlay transport. See `npm-republish-plan.md` for the republish checklist. npm package rename is **not** supported — reuse `antora-dark-mode`.
4+
35
## Already deprecated on npmjs.com?
46

57
You cannot “double-deprecate.” Running `npm deprecate` again (CLI) or using the website **replaces** the message on the versions you target—it does not stack.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# npm re-publish plan — antora-dark-mode
2+
3+
## Goal
4+
5+
Publish `antora-dark-mode` to npm as **overlay transport** (`supplemental-ui/` + `ui-modules/`).
6+
7+
**Note:** As of 2026-06-13, `antora-dark-mode` is **not yet on npm** (404). Legacy installs used `antora-dark-theme@1.0.9` (deprecated). This is a **first publish** under the new name, not a registry rename.
8+
9+
## npm rename — not possible
10+
11+
| Action | Supported? |
12+
|--------|------------|
13+
| Publish new versions to existing `antora-dark-mode` | Yes — same package name, same maintainer access |
14+
| Rename `antora-dark-mode` → new name on npm | **No** — npm has no rename API |
15+
| Redirect `antora-dark-theme``antora-dark-mode` | Deprecate old package only; names stay separate |
16+
17+
**Recommendation:** Reuse `antora-dark-mode` on npm. Do not attempt a registry rename.
18+
19+
## Tarball contents
20+
21+
```
22+
supplemental-ui/ # overlay install (Default UI or theme bundle + supplemental_files)
23+
ui-modules/ # slot-based dark-mode module + registry.json5
24+
```
25+
26+
Not included: pre-merged `ui-bundle.zip` (GitHub Releases only).
27+
28+
## Pre-publish checklist
29+
30+
1. `pnpm ui-modules:sync` — CSS/JS synced from `supplemental-ui/`
31+
2. `pnpm ui-modules:validate` — manifests + `registry-index.json`
32+
3. `README.md` — overlay-first install (not bundle-only retirement)
33+
4. `package.json``"files": ["supplemental-ui/**/*", "ui-modules/**/*"]`
34+
5. Version bump aligned with git tag (e.g. `1.3.0`)
35+
36+
## Publish sequence
37+
38+
**Local (requires `npm login`):**
39+
40+
```powershell
41+
cd Z:\code\github.com\antora-supplemental\antora-dark-mode
42+
pnpm publish:npm
43+
```
44+
45+
**CI:** `.github/workflows/release.yml` publishes on semver tags when `NPM_TOKEN` is configured.
46+
47+
```powershell
48+
# After publish — deprecate legacy package name (if you own antora-dark-theme)
49+
npm deprecate antora-dark-theme@* "Renamed — use antora-dark-mode. See https://github.com/antora-supplemental/antora-dark-mode"
50+
```
51+
52+
`prepack` script runs sync + validate automatically.
53+
54+
## Post-publish
55+
56+
- Update Antora Supplemental extensions catalog: npm = optional transport
57+
- GitHub Release still ships `ui-bundle.zip` as **convenience** (Default UI only)
58+
- Clear npm retirement banner (`npm deprecate … ""`)
59+
- Announce migration for sites using `antora-dark-mode` as `ui.bundle` + valentus `supplemental_files`
60+
61+
## CI
62+
63+
`.github/workflows/release.yml` — no change required for npm; optional future job for `npm publish` with `NPM_TOKEN` and `environment: npm` if maintainers want automated registry publish again.
64+
65+
## Related docs
66+
67+
- `docs/modules/guide/pages/npm-distribution.adoc` — consumer-facing
68+
- `docs/modules/guide/pages/installation.adoc` — overlay-first install
69+
- `docs/modules/guide/pages/ui-modules.adoc` — orchestrator path

docs/modules/guide/nav.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.Documentation
22
* xref:index.adoc[Getting Started]
33
* xref:installation.adoc[Installation]
4-
* xref:npm-deprecation.adoc[npm deprecation]
4+
* xref:ui-modules.adoc[UI Modules]
5+
* xref:npm-distribution.adoc[npm distribution]
56
* xref:configuration.adoc[Configuration]
67
* xref:version-pinning.adoc[Version Pinning]
78
* xref:customization.adoc[Customization]

0 commit comments

Comments
 (0)