Skip to content

Commit aefcd94

Browse files
committed
Declare canonical URL
1 parent 55112c6 commit aefcd94

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

doc-extension.groovy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Preprocessor for since/until roles in pdf backend (in html5 backed this is handled using CSS)
22
preprocessor {
33
document, reader ->
4-
if (document.options['backend'] != 'pdf') {
4+
if (!document.basebackend('pdf')) {
55
println 'skipping since/until preprocessor for non-PDF'
66
return
77
}
@@ -26,4 +26,12 @@ preprocessor {
2626
}
2727
}
2828
reader.restoreLines(replacement)
29+
}
30+
docinfo_processor {
31+
document -> {
32+
if (!document.basebackend('html') || !document.hasAttribute('fb-canonical-html')) {
33+
return
34+
}
35+
return "<link rel=\"canonical\" href=\"${document.getAttribute('fb-canonical-html')}\"/>"
36+
}
2937
}

src/docs/asciidoc/jaybird_manual.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Roman Rokytskyy; Mark Rotteveel
2626
:jaybird-template-version: {jaybird5-template-version}
2727
:jna-version: 5.14.0
2828
:min-support-firebird: 2.5
29+
:fb-canonical-html: https://firebirdsql.github.io/jaybird-manual/jaybird_manual.html
2930
:is-snapshot:
3031

3132
ifdef::is-snapshot[]

0 commit comments

Comments
 (0)