Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion documentation/documentation.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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/**'
}
}
}
Comment on lines +268 to +288
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it wild to duplicate all this code for every single "root" AsciiDoc file.

Would be nice to have some sort of loop, e.g. ['userguide', 'topical/logging', ...].each { ... }.

But... not today.


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/' ) {
Expand All @@ -284,6 +330,9 @@ def renderTopicalGuideHtmlTask = tasks.register( 'renderTopicalGuideHtml', Ascii
include 'script/**'
}
}

dependsOn renderTopicalLoggingGuideHtmlTask
dependsOn renderTopicalRegistriesGuideHtmlTask
}

def renderTopicalGuidesTask = tasks.register( 'renderTopicalGuides', AsciidoctorTask ) { task ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
:toc2:
:toclevels: 3
:sectanchors:
:html-meta-canonical-link: https://docs.hibernate.org/stable/orm/integrationguide/html_single/

include::preface.adoc[]

Expand Down
1 change: 1 addition & 0 deletions documentation/src/main/asciidoc/introduction/index.adoc
Original file line number Diff line number Diff line change
@@ -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[]
Expand Down
1 change: 1 addition & 0 deletions documentation/src/main/asciidoc/querylanguage/index.adoc
Original file line number Diff line number Diff line change
@@ -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[]
Expand Down
Original file line number Diff line number Diff line change
@@ -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[]
Expand Down
1 change: 1 addition & 0 deletions documentation/src/main/asciidoc/repositories/index.adoc
Original file line number Diff line number Diff line change
@@ -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[]
Expand Down
2 changes: 0 additions & 2 deletions documentation/src/main/asciidoc/shared/url-attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions documentation/src/main/asciidoc/topical/index.adoc
Original file line number Diff line number Diff line change
@@ -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[]
Expand Down Expand Up @@ -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]]
Expand All @@ -52,7 +53,7 @@ See the link:{doc-user-guide-url}#tooling[Tooling Guide] for information on:


== Integrator Guides
* The <<registries/ServiceRegistries.adoc#registries-guide,Service Registries Guide>> 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


Expand Down
Original file line number Diff line number Diff line change
@@ -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[]
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -612,4 +614,4 @@ StandardServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder()

== Conclusion

TODO
TODO
2 changes: 1 addition & 1 deletion documentation/src/main/asciidoc/userguide/index.adoc
Original file line number Diff line number Diff line change
@@ -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/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently these canonical links are new, so changing them shouldn't have a big effect on SEO.

+1.


include::{shared-attributes-dir}/common-attributes.adoc[]
include::{shared-attributes-dir}/url-attributes.adoc[]
Expand Down