Antora UI Bundle Architecture
Overview
All Domus Digitalis documentation sites share a single, centrally managed UI bundle hosted on Cloudflare Pages and protected by Cloudflare Access.
Components
domus-antora-ui Repository
Private GitHub repository containing the UI source code.
Location |
|
Purpose |
Custom Antora UI bundle with enterprise styling |
Build |
|
Output |
|
Key features:
-
Multi-theme support: Dark (default), Catppuccin Mocha, Light
-
Focus mode: Press
Ffor distraction-free reading -
Code enhancements: Language badges, copy buttons
-
Premium styling: Gold sidebars, executive summary tables
Configuration
Environment Variables
Set in Cloudflare Pages > domus-docs > Settings > Environment Variables:
| Variable | Purpose | Required |
|---|---|---|
|
GitHub PAT for private repo access |
Yes |
|
Cloudflare Access service token ID |
Yes |
|
Cloudflare Access service token secret |
Yes |
domus-docs Build Script
The build.sh script in domus-docs:
-
Validates required environment variables
-
Fetches UI bundle with Access authentication
-
Injects GitHub token into playbook URLs
-
Runs Antora build
# Fetch UI bundle with Cloudflare Access auth
curl -sfo ui-bundle.zip \
-H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
-H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET" \
https://ui.domusdigitalis.dev/ui-bundle.zip
Operations
Updating the UI
To update styling, themes, or functionality:
cd ~/atelier/_bibliotheca/domus-antora-ui
# Make changes to src/css/ or src/js/
# Build locally to test
npm run build
# Preview (optional)
npm run preview
# Commit and push
git add -A && git commit -m "feat(ui): Description of changes"
git push
Cloudflare Pages automatically rebuilds. All documentation sites get the new UI on their next build.
Troubleshooting
Build fails with "Failed to fetch UI bundle"
-
Verify service token is valid (not expired)
-
Check environment variables in Cloudflare Pages
-
Verify service token has access to antora-ui-bundle application
Security Considerations
-
UI bundle contains no secrets (CSS/JS/templates only)
-
Access protection adds defense-in-depth
-
Service tokens should be rotated periodically
-
Token credentials stored in age-encrypted secrets repo