Skip to content

Commit

Permalink
GH-393 - Switch to Spring HTML Asciidoctor backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Sep 6, 2023
1 parent 8361de4 commit 8747d1c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 55 deletions.
63 changes: 8 additions & 55 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<java.version>17</java.version>
<jmolecules.version>2023.1.0</jmolecules.version>
<spring-modulith.version>1.0.0</spring-modulith.version>
<refdocs.dir>${project.build.directory}/refdocs</refdocs.dir>
<spring-asciidoctor-backends.version>0.0.7</spring-asciidoctor-backends.version>
</properties>

<profiles>
Expand All @@ -44,29 +44,6 @@
</configuration>
</plugin>

<!-- Use Spring documentation resources -->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-doc-resources</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<includeGroupIds>io.spring.docresources</includeGroupIds>
<includeArtifactIds>spring-doc-resources</includeArtifactIds>
<includeTypes>zip</includeTypes>
<excludeTransitive>true</excludeTransitive>
<outputDirectory>${refdocs.dir}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
Expand All @@ -82,6 +59,11 @@
<artifactId>asciidoctorj-diagram</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>io.spring.asciidoctor.backends</groupId>
<artifactId>spring-asciidoctor-backends</artifactId>
<version>${spring-asciidoctor-backends.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
Expand Down Expand Up @@ -113,27 +95,15 @@
</executions>
<configuration>
<doctype>book</doctype>
<backend>html5</backend>
<backend>spring-html</backend>
<resources>
<!-- Copy our own resources first to make sure they trump the others -->
<resource>
<directory>src/main/asciidoc</directory>
</resource>
<resource>
<directory>${refdocs.dir}</directory>
</resource>

</resources>
<attributes>
<dev>${dev}</dev>
<docinfo>shared</docinfo>
<docinfodir>${refdocs.dir}</docinfodir>
<highlightjsdir>js/highlight</highlightjsdir>
<icons>font</icons>
<linkcss>true</linkcss>
<numbered>true</numbered>
<sectanchors>true</sectanchors>
<source-highlighter>highlight.js</source-highlighter>
<stylesdir>css/</stylesdir>
<stylesheet>salespoint.css</stylesheet>
<toc>left</toc>
<version>${project.version}</version>
Expand Down Expand Up @@ -291,16 +261,6 @@
<artifactId>jmolecules-spring</artifactId>
</dependency>

<!-- Documentation -->

<dependency>
<groupId>io.spring.docresources</groupId>
<artifactId>spring-doc-resources</artifactId>
<version>0.2.5</version>
<type>zip</type>
<optional>true</optional>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -464,13 +424,6 @@
</distributionManagement>

<repositories>
<repository>
<id>spring-milestone</id>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>salespointframework</id>
<url>https://www.st.inf.tu-dresden.de/SalesPoint/repository</url>
Expand Down
9 changes: 9 additions & 0 deletions src/main/asciidoc/css/salespoint.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ body.toc2 {
padding: 0;
}

#back-to-index {
display: none;
}

#banner-container {
overflow: visible;
border: none;
}

/* Custom TOC header */

#toc::before {
Expand Down
1 change: 1 addition & 0 deletions src/main/asciidoc/docinfo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link href="css/salespoint.css" rel="stylesheet">
1 change: 1 addition & 0 deletions src/main/asciidoc/salespoint-reference.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
= Salespoint Framework - Technical Reference
Andreas Zaschka; Paul Henke; Oliver Drotbohm;
:doctype: book
:docinfo: shared
:javadoc: https://st.inf.tu-dresden.de/SalesPoint{dev}/api/
:source-base: ../../main/java/org/salespointframework
:source-base-test: ../../test/java/org/salespointframework
Expand Down

0 comments on commit 8747d1c

Please sign in to comment.