Using the Template
The easiest way to create a gallery-ready theme is to start from our template repository.
What’s Included
The template provides:
-
Sample Antora content - Documentation that showcases all UI elements
-
Pre-configured GitHub Action - Automatically builds and deploys your preview
-
Screenshot generation - Creates
preview.pngon every push -
Standard structure - Everything in the right place
Creating Your Theme
Step 1: Use the Template
-
Click btn:[Use this template] → btn:[Create a new repository]
-
Name your repository (e.g.,
my-antora-theme) -
Make it Public
-
Click btn:[Create repository]
Step 2: Enable GitHub Pages
-
Go to your new repository’s Settings
-
Navigate to Pages in the sidebar
-
Under "Build and deployment":
-
Source: GitHub Actions
-
-
Save
Step 3: Customize Your Theme
Clone your repository and modify the UI source files:
git clone https://github.com/yourusername/my-antora-theme.git
cd my-antora-theme
npm install
Key files to customize:
| Directory | Purpose |
|---|---|
|
Stylesheets - colors, typography, layout |
|
Page templates (default.hbs, 404.hbs) |
|
Reusable components (header, footer, nav, toc) |
|
Client-side JavaScript |
|
Handlebars helpers |
Step 4: Preview Locally
# Build the UI bundle
npx gulp bundle
# Build the preview site
npx antora antora-playbook.yml
# Open build/site/index.html in your browser
Step 5: Push Changes
git add .
git commit -m "Customize theme"
git push
The GitHub Action will automatically:
-
Build your UI bundle
-
Generate the preview site
-
Deploy to GitHub Pages
-
Create
preview.png
Your preview will be available at:
https://{username}.github.io/{repo-name}/