diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index 3fe2cbc6ed0e..f2e1ceb1e298 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -265,13 +265,59 @@ asciidoctorj { // Topical Guides ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +def renderTopicalLoggingGuideHtmlTask = tasks.register( 'renderTopicalLoggingGuideHtml', AsciidoctorTask ) { task -> + group = "Documentation" + description = 'Renders the Topical Logging Guide in HTML format using Asciidoctor.' + inputs.property "hibernate-version", hibernateVersion + + sourceDir = file( 'src/main/asciidoc/topical/logging' ) + sources 'index.adoc' + outputDir = project.layout.buildDirectory.file( "asciidoc/topical/html_single/logging" ).get().asFile + + resources { + from( 'src/main/asciidoc/topical/' ) { + include '**/images/**' + } + from(rootProject.layout.buildDirectory.dir("unpacked-theme").get() + .dir("hibernate-asciidoctor-theme").dir("asciidoc")) { + include 'css/**' + include 'images/**' + include 'script/**' + } + } +} + +def renderTopicalRegistriesGuideHtmlTask = tasks.register( 'renderTopicalRegistriesGuideHtml', AsciidoctorTask ) { task -> + group = "Documentation" + description = 'Renders the Topical Registries Guide in HTML format using Asciidoctor.' + inputs.property "hibernate-version", hibernateVersion + + sourceDir = file( 'src/main/asciidoc/topical/registries' ) + sources 'index.adoc' + outputDir = project.layout.buildDirectory.file( "asciidoc/topical/html_single/registries" ).get().asFile + + resources { + from( 'src/main/asciidoc/topical/' ) { + include '**/images/**' + } + from(rootProject.layout.buildDirectory.dir("unpacked-theme").get() + .dir("hibernate-asciidoctor-theme").dir("asciidoc")) { + include 'css/**' + include 'images/**' + include 'script/**' + } + } +} + + def renderTopicalGuideHtmlTask = tasks.register( 'renderTopicalGuideHtml', AsciidoctorTask ) { task -> group = "Documentation" description = 'Renders the Topical Guides in HTML format using Asciidoctor.' inputs.property "hibernate-version", hibernateVersion sourceDir = file( 'src/main/asciidoc/topical' ) - outputDir = new File( "$buildDir/asciidoc/topical/html_single" ) + sources 'index.adoc' + outputDir = project.layout.buildDirectory.file( "asciidoc/topical/html_single" ).get().asFile resources { from( 'src/main/asciidoc/topical/' ) { @@ -284,6 +330,9 @@ def renderTopicalGuideHtmlTask = tasks.register( 'renderTopicalGuideHtml', Ascii include 'script/**' } } + + dependsOn renderTopicalLoggingGuideHtmlTask + dependsOn renderTopicalRegistriesGuideHtmlTask } def renderTopicalGuidesTask = tasks.register( 'renderTopicalGuides', AsciidoctorTask ) { task -> diff --git a/documentation/src/main/asciidoc/integrationguide/index.adoc b/documentation/src/main/asciidoc/integrationguide/index.adoc index 1b6b15c27cde..92188c2426bb 100644 --- a/documentation/src/main/asciidoc/integrationguide/index.adoc +++ b/documentation/src/main/asciidoc/integrationguide/index.adoc @@ -2,6 +2,7 @@ :toc2: :toclevels: 3 :sectanchors: +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/integrationguide/html_single/ include::preface.adoc[] diff --git a/documentation/src/main/asciidoc/introduction/index.adoc b/documentation/src/main/asciidoc/introduction/index.adoc index 551fbb88c304..eecb72486d5e 100644 --- a/documentation/src/main/asciidoc/introduction/index.adoc +++ b/documentation/src/main/asciidoc/introduction/index.adoc @@ -1,4 +1,5 @@ :shared-attributes-dir: {doc-main-dir}/asciidoc/shared +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/introduction/html_single/ include::{shared-attributes-dir}/common-attributes.adoc[] include::{shared-attributes-dir}/url-attributes.adoc[] diff --git a/documentation/src/main/asciidoc/querylanguage/index.adoc b/documentation/src/main/asciidoc/querylanguage/index.adoc index 218c60c51ef6..af632e4eebd4 100644 --- a/documentation/src/main/asciidoc/querylanguage/index.adoc +++ b/documentation/src/main/asciidoc/querylanguage/index.adoc @@ -1,4 +1,5 @@ :shared-attributes-dir: {doc-main-dir}/asciidoc/shared +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/querylanguage/html_single/ include::{shared-attributes-dir}/common-attributes.adoc[] include::{shared-attributes-dir}/url-attributes.adoc[] diff --git a/documentation/src/main/asciidoc/quickstart/guides/index.adoc b/documentation/src/main/asciidoc/quickstart/guides/index.adoc index b6d26a387e19..f1e862f4e37e 100644 --- a/documentation/src/main/asciidoc/quickstart/guides/index.adoc +++ b/documentation/src/main/asciidoc/quickstart/guides/index.adoc @@ -1,4 +1,5 @@ :shared-attributes-dir: {doc-main-dir}/asciidoc/shared +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/quickstart/html_single/ include::{shared-attributes-dir}/common-attributes.adoc[] include::{shared-attributes-dir}/url-attributes.adoc[] diff --git a/documentation/src/main/asciidoc/repositories/index.adoc b/documentation/src/main/asciidoc/repositories/index.adoc index 0bfcd76b69a5..32b5c97962ff 100644 --- a/documentation/src/main/asciidoc/repositories/index.adoc +++ b/documentation/src/main/asciidoc/repositories/index.adoc @@ -1,4 +1,5 @@ :shared-attributes-dir: {doc-main-dir}/asciidoc/shared +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/repositories/html_single/ include::{shared-attributes-dir}/common-attributes.adoc[] include::{shared-attributes-dir}/url-attributes.adoc[] diff --git a/documentation/src/main/asciidoc/shared/url-attributes.adoc b/documentation/src/main/asciidoc/shared/url-attributes.adoc index 3008ae3ac3e9..bc4b402cb819 100644 --- a/documentation/src/main/asciidoc/shared/url-attributes.adoc +++ b/documentation/src/main/asciidoc/shared/url-attributes.adoc @@ -14,8 +14,6 @@ include::./common-attributes.adoc[] :doc-user-guide-url: {doc-version-base-url}/userguide/html_single/Hibernate_User_Guide.html :doc-javadoc-url: {doc-version-base-url}/javadocs/ :doc-topical-url: {doc-version-base-url}/topical/html_single/ -:doc-registries-url: {doc-topical-url}/registries/ServiceRegistries.html -:doc-logging-url: {doc-topical-url}/logging/Logging.html :report-deprecation-url: {doc-version-base-url}/deprecated/deprecating.txt :report-dialect-url: {doc-version-base-url}/dialect/dialect.html diff --git a/documentation/src/main/asciidoc/topical/index.adoc b/documentation/src/main/asciidoc/topical/index.adoc index d5c8499a42f4..f0b9b9fba95e 100644 --- a/documentation/src/main/asciidoc/topical/index.adoc +++ b/documentation/src/main/asciidoc/topical/index.adoc @@ -1,4 +1,5 @@ :shared-attributes-dir: {doc-main-dir}/asciidoc/shared +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/topical/html_single/ include::{shared-attributes-dir}/common-attributes.adoc[] include::{shared-attributes-dir}/url-attributes.adoc[] @@ -37,7 +38,7 @@ link:{doc-user-guide-url}[User Guide]:: [[logging]] == Logging -The link:{doc-logging-url}[Logging Guide] discusses logging in Hibernate. +The xref:logging/index.adoc[Logging Guide] discusses logging in Hibernate. [[tooling]] @@ -52,7 +53,7 @@ See the link:{doc-user-guide-url}#tooling[Tooling Guide] for information on: == Integrator Guides -* The <> discusses Hibernate Service and ServiceRegistry contracts. +* The xref:registries/index.adoc#registries-guide[Service Registries Guide] discusses Hibernate Service and ServiceRegistry contracts. * Others coming soon diff --git a/documentation/src/main/asciidoc/topical/logging/Logging.adoc b/documentation/src/main/asciidoc/topical/logging/index.adoc similarity index 85% rename from documentation/src/main/asciidoc/topical/logging/Logging.adoc rename to documentation/src/main/asciidoc/topical/logging/index.adoc index 6055184886b8..9bfff37e9c5e 100644 --- a/documentation/src/main/asciidoc/topical/logging/Logging.adoc +++ b/documentation/src/main/asciidoc/topical/logging/index.adoc @@ -1,4 +1,5 @@ :shared-attributes-dir: {doc-main-dir}/asciidoc/shared +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/topical/html_single/logging/ include::{shared-attributes-dir}/common-attributes.adoc[] include::{shared-attributes-dir}/url-attributes.adoc[] diff --git a/documentation/src/main/asciidoc/topical/registries/ServiceRegistries.adoc b/documentation/src/main/asciidoc/topical/registries/index.adoc similarity index 99% rename from documentation/src/main/asciidoc/topical/registries/ServiceRegistries.adoc rename to documentation/src/main/asciidoc/topical/registries/index.adoc index 42150f386edc..ad3a28b2ccb2 100644 --- a/documentation/src/main/asciidoc/topical/registries/ServiceRegistries.adoc +++ b/documentation/src/main/asciidoc/topical/registries/index.adoc @@ -1,7 +1,9 @@ +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/topical/html_single/registries/ + [[registries-guide]] = Services and Registries :imagesdir: images -:toc: +:toc2: Services and Registries are new *as a formalized concept* starting in 4.0. But the functionality provided by the different Services have actually been around in Hibernate much, much longer. What is new is managing them, @@ -612,4 +614,4 @@ StandardServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder() == Conclusion -TODO \ No newline at end of file +TODO diff --git a/documentation/src/main/asciidoc/userguide/index.adoc b/documentation/src/main/asciidoc/userguide/index.adoc index 477df06acb98..b438b52ab2c4 100644 --- a/documentation/src/main/asciidoc/userguide/index.adoc +++ b/documentation/src/main/asciidoc/userguide/index.adoc @@ -1,5 +1,5 @@ :shared-attributes-dir: {doc-main-dir}/asciidoc/shared -:html-meta-canonical-link: https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html +:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/userguide/html_single/ include::{shared-attributes-dir}/common-attributes.adoc[] include::{shared-attributes-dir}/url-attributes.adoc[]