Skip to content

Commit 46fd004

Browse files
committed
docs: sync READMEs and add stacked overrides guide
- Updated README.md with Method 1 (Pre-built bundle) for NPM users - Added Method 4: Stacked Overrides to both README.md and README.adoc - Improved clarity of installation methods for better developer experience
1 parent 5b88827 commit 46fd004

2 files changed

Lines changed: 51 additions & 1 deletion

File tree

README.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,21 @@ ui:
122122
supplemental_files: ./node_modules/antora-dark-theme/supplemental-ui
123123
----
124124

125+
=== Method 4: Stacked Overrides (Deep Customization)
126+
127+
To override the dark theme's own overrides with your project-specific customizations, use an array for `supplemental_files`. Paths listed later take precedence.
128+
129+
[source,yaml]
130+
----
131+
ui:
132+
bundle:
133+
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
134+
snapshot: true
135+
supplemental_files:
136+
- ./node_modules/antora-dark-theme/supplemental-ui
137+
- ./site/src
138+
----
139+
125140
== Live Demo
126141

127142
See the dark theme in action: {url-demo}[Live Demo]

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,28 @@ yarn add -D antora-dark-theme
2323
bun add -d antora-dark-theme
2424
```
2525

26-
Then configure your playbook file(s) (typically `antora-playbook.yml`) to load the supplemental UI from `node_modules`:
26+
Then configure your playbook file(s) (typically `antora-playbook.yml`) to use the theme.
27+
28+
### Method 1: Use pre-built bundle (Recommended)
29+
30+
The easiest way to use this theme is to point your Antora playbook directly to the latest pre-built UI bundle. This includes the Antora Default UI plus all dark mode enhancements without requiring any local package installation.
31+
32+
```yaml
33+
ui:
34+
bundle:
35+
url: https://github.com/antora-supplemental/antora-dark-theme/releases/latest/download/ui-bundle.zip
36+
snapshot: true
37+
```
38+
39+
### Method 2: Use as npm dependency
40+
41+
Install the package:
42+
43+
```bash
44+
pnpm add -D antora-dark-theme
45+
```
46+
47+
Then reference the supplemental UI from `node_modules`:
2748

2849
```yaml
2950
ui:
@@ -33,6 +54,20 @@ ui:
3354
supplemental_files: ./node_modules/antora-dark-theme/supplemental-ui
3455
```
3556
57+
### Method 3: Stacked Overrides (Deep Customization)
58+
59+
To override the dark theme's own overrides with your project-specific customizations, use an array for `supplemental_files`. Paths listed later take precedence.
60+
61+
```yaml
62+
ui:
63+
bundle:
64+
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
65+
snapshot: true
66+
supplemental_files:
67+
- ./node_modules/antora-dark-theme/supplemental-ui
68+
- ./site/src
69+
```
70+
3671
## Features
3772

3873
- Dark mode toggle button (sun/moon icons)

0 commit comments

Comments
 (0)