Skip to content

Commit 78871d7

Browse files
committed
Tighten up sourceDocumentExtensions used for single and multi-page docs
Previously, the sourceDocumentExtension used for the single-page documentation was htmlsingleadoc and for the multi-page docs they were adoc and htmladoc. When finding source files to render, the Asciidoctor Maven Plugin looks for files with a name that ends with one of the configured extensions. This resulted in the index.htmlsingleadoc file matching the adoc extention in the multi-page configuration in addition to the intended match for the index.htmladoc. As a result both the single-page and multi-page indexes were rendered when rendering the multi-page documentation. In addition to this unwanted rendering, if the single-page index was rendered after the multi-page index, the multi-page index would be overwritten by the single-page index, leaving the multi-page docs with the wrong index file. Asciidoctor uses File.listFiles() during its source file discovery which is documented as having no guarantee that the resulting array will be in any specific order. As a result, there was also no guarantee about which index we'd end up with. Closes gh-17263
1 parent ea1dc85 commit 78871d7

File tree

1 file changed

+3
-3
lines changed
  • spring-boot-project/spring-boot-docs

1 file changed

+3
-3
lines changed

spring-boot-project/spring-boot-docs/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,8 +1476,8 @@
14761476
<configuration>
14771477
<backend>html5</backend>
14781478
<sourceDocumentExtensions>
1479-
<sourceDocumentExtension>adoc</sourceDocumentExtension>
1480-
<sourceDocumentExtension>htmladoc</sourceDocumentExtension>
1479+
<sourceDocumentExtension>.adoc</sourceDocumentExtension>
1480+
<sourceDocumentExtension>.htmladoc</sourceDocumentExtension>
14811481
</sourceDocumentExtensions>
14821482
<outputDirectory>${project.build.directory}/generated-docs/reference/html</outputDirectory>
14831483
<sourceHighlighter>highlight.js</sourceHighlighter>
@@ -1509,7 +1509,7 @@
15091509
<configuration>
15101510
<backend>html5</backend>
15111511
<sourceDocumentExtensions>
1512-
<sourceDocumentExtension>htmlsingleadoc</sourceDocumentExtension>
1512+
<sourceDocumentExtension>.htmlsingleadoc</sourceDocumentExtension>
15131513
</sourceDocumentExtensions>
15141514
<outputDirectory>${project.build.directory}/generated-docs/reference/htmlsingle</outputDirectory>
15151515
<sourceHighlighter>highlight.js</sourceHighlighter>

0 commit comments

Comments
 (0)