From 4c58af81359fda1e95501ed46776c3c49d1c1c90 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 12 Sep 2026 09:07:33 +0300 Subject: [PATCH] Add the Asciidoctor tabs extension Per-build-tool instructions (Leiningen, tools.deps, Gradle...) read much better as tabs than as a run of near-identical subsections. The extension's stylesheet and script come straight from the npm package via supplemental files, which means the supplemental UI is now listed file by file in the playbook instead of as a directory. --- antora-playbook.yml | 19 ++++++++++++++++++- package-lock.json | 12 +++++++++++- package.json | 3 ++- supplemental-ui/partials/footer-content.hbs | 1 + supplemental-ui/partials/head-meta.hbs | 1 + 5 files changed, 33 insertions(+), 3 deletions(-) diff --git a/antora-playbook.yml b/antora-playbook.yml index e2966311..41dfcb3a 100644 --- a/antora-playbook.yml +++ b/antora-playbook.yml @@ -48,10 +48,27 @@ asciidoc: linkattrs: "" toc: ~ page-pagination: "" + extensions: + - "@asciidoctor/tabs" ui: bundle: url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable snapshot: true - supplemental_files: ./supplemental-ui + supplemental_files: + - path: css/site-extra.css + contents: ./supplemental-ui/css/site-extra.css + - path: img/favicon.ico + contents: ./supplemental-ui/img/favicon.ico + - path: partials/footer-content.hbs + contents: ./supplemental-ui/partials/footer-content.hbs + - path: partials/head-meta.hbs + contents: ./supplemental-ui/partials/head-meta.hbs + - path: partials/header-content.hbs + contents: ./supplemental-ui/partials/header-content.hbs + # Assets of the tabs extension, taken straight from the npm package. + - path: css/vendor/tabs.css + contents: ./node_modules/@asciidoctor/tabs/dist/css/tabs.css + - path: js/vendor/tabs.js + contents: ./node_modules/@asciidoctor/tabs/dist/js/tabs.js output: dir: build/site diff --git a/package-lock.json b/package-lock.json index 1e226ba7..9757bea8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,8 @@ "": { "dependencies": { "@antora/cli": "3.2.0", - "@antora/site-generator": "3.2.0" + "@antora/site-generator": "3.2.0", + "@asciidoctor/tabs": "1.0.0-beta.6" } }, "node_modules/@antora/asciidoc-loader": { @@ -283,6 +284,15 @@ "yarn": ">=1.1.0" } }, + "node_modules/@asciidoctor/tabs": { + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@asciidoctor/tabs/-/tabs-1.0.0-beta.6.tgz", + "integrity": "sha512-gGZnW7UfRXnbiyKNd9PpGKtSuD8+DsqaaTSbQ1dHVkZ76NaolLhdQg8RW6/xqN3pX1vWZEcF4e81+Oe9rNRWxg==", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@iarna/toml": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", diff --git a/package.json b/package.json index ba0773cf..4a0bbf27 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "dependencies": { "@antora/cli": "3.2.0", - "@antora/site-generator": "3.2.0" + "@antora/site-generator": "3.2.0", + "@asciidoctor/tabs": "1.0.0-beta.6" }, "scripts": { "antora": "antora" diff --git a/supplemental-ui/partials/footer-content.hbs b/supplemental-ui/partials/footer-content.hbs index 54f7621e..2539ef48 100644 --- a/supplemental-ui/partials/footer-content.hbs +++ b/supplemental-ui/partials/footer-content.hbs @@ -2,6 +2,7 @@

Copyright (C) 2012-2026 Bozhidar Batsov and CIDER contributors.

Except where otherwise noted, docs.cider.mx is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).

+