From aefcd948dbbc5b4014295bf0172312c0c87bcaa8 Mon Sep 17 00:00:00 2001 From: Mark Rotteveel Date: Sun, 13 Oct 2024 13:10:14 +0200 Subject: [PATCH] Declare canonical URL --- doc-extension.groovy | 10 +++++++++- src/docs/asciidoc/jaybird_manual.adoc | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc-extension.groovy b/doc-extension.groovy index 9a9be19..fd7db18 100644 --- a/doc-extension.groovy +++ b/doc-extension.groovy @@ -1,7 +1,7 @@ // Preprocessor for since/until roles in pdf backend (in html5 backed this is handled using CSS) preprocessor { document, reader -> - if (document.options['backend'] != 'pdf') { + if (!document.basebackend('pdf')) { println 'skipping since/until preprocessor for non-PDF' return } @@ -26,4 +26,12 @@ preprocessor { } } reader.restoreLines(replacement) +} +docinfo_processor { + document -> { + if (!document.basebackend('html') || !document.hasAttribute('fb-canonical-html')) { + return + } + return "" + } } \ No newline at end of file diff --git a/src/docs/asciidoc/jaybird_manual.adoc b/src/docs/asciidoc/jaybird_manual.adoc index d486dda..a0d4341 100644 --- a/src/docs/asciidoc/jaybird_manual.adoc +++ b/src/docs/asciidoc/jaybird_manual.adoc @@ -26,6 +26,7 @@ Roman Rokytskyy; Mark Rotteveel :jaybird-template-version: {jaybird5-template-version} :jna-version: 5.14.0 :min-support-firebird: 2.5 +:fb-canonical-html: https://firebirdsql.github.io/jaybird-manual/jaybird_manual.html :is-snapshot: ifdef::is-snapshot[]