Skip to content

Commit

Permalink
Add EPUB output
Browse files Browse the repository at this point in the history
Add EPUB output and make all four output formats have links to one another,
to enable discoverability and accessibility (for the folks who need a
particular format to help them read the document).
  • Loading branch information
Jay Bryant authored and fmbenhassine committed May 21, 2021
1 parent f4e14dd commit 92e6f32
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 11 deletions.
11 changes: 6 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<module>spring-batch-jsr352-tck</module>
<module>spring-batch-docs</module>
</modules>

<organization>
<name>Spring</name>
<url>https://spring.io</url>
Expand Down Expand Up @@ -113,10 +113,11 @@
<quartz.version>2.3.2</quartz.version>
<prometheus_pushgateway.version>0.10.0</prometheus_pushgateway.version>
<groovy.version>2.5.14</groovy.version>

<!-- documentation dependencies -->
<spring-doc-resources.version>0.2.5</spring-doc-resources.version>
<asciidoctorj-pdf.version>1.5.4</asciidoctorj-pdf.version>
<asciidoctorj-epub.version>1.5.1</asciidoctorj-epub.version>

<!-- plugin versions -->
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
Expand Down Expand Up @@ -276,7 +277,7 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>test-coverage</id>
Expand Down Expand Up @@ -334,7 +335,7 @@
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>maven-central</id>
Expand Down Expand Up @@ -385,7 +386,7 @@
</snapshots>
</pluginRepository>
</pluginRepositories>

<developers>
<developer>
<id>dsyer</id>
Expand Down
32 changes: 29 additions & 3 deletions spring-batch-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<type>zip</type>
</dependency>
</dependencies>

<build>
<resources>
<resource>
Expand Down Expand Up @@ -66,6 +66,11 @@
<artifactId>asciidoctorj-pdf</artifactId>
<version>${asciidoctorj-pdf.version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-epub3</artifactId>
<version>${asciidoctorj-epub.version}</version>
</dependency>
</dependencies>
<configuration>
<sourceDirectory>${project.basedir}/src/main/asciidoc</sourceDirectory>
Expand Down Expand Up @@ -120,6 +125,27 @@
</attributes>
</configuration>
</execution>
<execution>
<id>generate-epub</id>
<phase>site</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>epub3</backend>
<doctype>book</doctype>
<attributes>
<icons>font</icons>
<pagenums />
<sectnums />
<sectanchors />
<toc />
<source-highlighter>coderay</source-highlighter>
<project-version>${project.version}</project-version>
<revnumber>${project.version}</revnumber>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -155,7 +181,7 @@
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>spring-releases</id>
Expand All @@ -167,4 +193,4 @@
</repository>
</repositories>

</project>
</project>
5 changes: 5 additions & 0 deletions spring-batch-docs/src/assembly/docs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@
<destName>spring-batch-reference.pdf</destName>
<outputDirectory>reference/pdf</outputDirectory>
</file>
<file>
<source>target/asciidoc/index-single.epub</source>
<destName>spring-batch-reference.epub</destName>
<outputDirectory>reference/epub</outputDirectory>
</file>
</files>
</assembly>
5 changes: 3 additions & 2 deletions spring-batch-docs/src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ include::header/index-header.adoc[]

// ======================================================================================

Welcome to the Spring Batch reference documentation! This documentation is also available
as single link:index-single.html[html] and link:../pdf/spring-batch-reference.pdf[pdf] documents.
This documentation is also available
as a link:index-single.html[single HTML file] and as link:../pdf/spring-batch-reference.pdf[PDF]
and link:../epub/spring-batch-reference.epub[EPUB] documents.

The reference documentation is divided into several sections:

Expand Down
19 changes: 18 additions & 1 deletion spring-batch-docs/src/main/asciidoc/spring-batch-intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,25 @@
:toc: left
:toclevels: 4

[[spring-batch-intro]]
ifdef::backend-html5[]
This documentation is also available
as link:index.html[multiple HTML files] and as link:../pdf/spring-batch-reference.pdf[PDF]
and link:../epub/spring-batch-reference.epub[EPUB] documents.
endif::[]

ifdef::backend-pdf[]
This documentation is also available
as link:index.html[multiple HTML files], a link:index-single.html[single HTML file],
and an link:../epub/spring-batch-reference.epub[EPUB] document.
endif::[]

ifdef::backend-epub3[]
This documentation is also available
as link:index.html[multiple HTML files], a link:index-single.html[single HTML file],
and a link:../pdf/spring-batch-reference.pdf[PDF] document.
endif::[]

[[spring-batch-intro]]
== Spring Batch Introduction

Many applications within the enterprise domain require bulk processing to perform
Expand Down

0 comments on commit 92e6f32

Please sign in to comment.