From d0dc191c2edf049a509a5aea0cefe22071d204a0 Mon Sep 17 00:00:00 2001 From: Hakim Date: Fri, 20 Jan 2023 17:06:47 +0000 Subject: [PATCH] Add 'DEBUG' flag output Experimental flag used to output information about each page. (This only shows page variables, so doesn't currently track e.g. the source of includes. That would probably require an Antora extension.) To build with this: - in docs-ui checkout, run `npx gulp bundle` - in docs-site run `DEBUG=1 antora --ui-bundle-url ../docs-ui/build/ui-bundle.zip` --- src/partials/main.hbs | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/src/partials/main.hbs b/src/partials/main.hbs index e0a3e041..bf363e9c 100644 --- a/src/partials/main.hbs +++ b/src/partials/main.hbs @@ -22,5 +22,67 @@
{{> crumbs}}
+{{#if env.DEBUG}} +
+
page.component = {{page.component.name}}
+
+
+
title
+
{{page.component.title}}
+
url
+
{{page.component.url}}
+
latest
+
{{page.component.latest}}
+
versions
+
{{page.component.versions}}
+
+
+ + +
page.componentVersion
+
+
+ {{#each page.componentVersion}} +
{{@key}}
+
{{this}}
+ {{/each}} +
+
+ +
page.version
+
{{page.version}}
+ +
page
+
+
+
module
+
{{page.module}}
+
url
+
{{page.url}}
+
version
+
{{page.version}}
+
fileUri
+
{{page.fileUri}}
+
+
+ +
antoraVersion
+
{{antoraVersion}}
+ +
site.components
+
+
+ {{#each site.components}} +
{{@key}}
+
{{this}}
+ {{/each}} +
+
+ +
site.ui
+
{{site.ui.defaultLayout}} {{site.ui.url}}
+ +
+{{/if}} {{> article}}