Skip to content

Commit

Permalink
Declare canonical URL
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Oct 13, 2024
1 parent 55112c6 commit aefcd94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doc-extension.groovy
Original file line number Diff line number Diff line change
@@ -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
}
Expand All @@ -26,4 +26,12 @@ preprocessor {
}
}
reader.restoreLines(replacement)
}
docinfo_processor {
document -> {
if (!document.basebackend('html') || !document.hasAttribute('fb-canonical-html')) {
return
}
return "<link rel=\"canonical\" href=\"${document.getAttribute('fb-canonical-html')}\"/>"
}
}
1 change: 1 addition & 0 deletions src/docs/asciidoc/jaybird_manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down

0 comments on commit aefcd94

Please sign in to comment.