Skip to content

Commit

Permalink
Define canonical URL in faq and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Oct 16, 2024
1 parent 4c68192 commit 2c39e44
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ processResources {
asciidoctorj {
// asciidoctorj 3.0.0 doesn't seem to work with asciidoctor-gradle-plugin 4.0.3
version = '2.5.13'

docExtensions file('doc-extension.groovy')
}

tasks.named('asciidoctor', AsciidoctorTask).configure {
Expand Down
8 changes: 8 additions & 0 deletions doc-extension.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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/faq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
:jaybird4-example-version: {jaybird4-full-version}.java11
:jaybird3-full-version: 3.0.12
:sectnums:
:fb-canonical-html: https://firebirdsql.org/docs/drivers/java/faq.html

[#jaybird]
= Jaybird
Expand Down
1 change: 1 addition & 0 deletions src/docs/asciidoc/release_notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
:jaybird-fbclient-version: 4.0.4.0
:firebird-java: https://groups.google.com/g/firebird-java
:issues: https://github.com/FirebirdSQL/jaybird/issues
:fb-canonical-html: https://firebirdsql.org/docs/drivers/java/6.0.x/release_notes.html

ifeval::["{version_tag}" != ""]
[WARNING]
Expand Down

0 comments on commit 2c39e44

Please sign in to comment.