From 78871d7a5daf51ecea33b416bee1d7a3345f217b Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 19 Jul 2019 14:55:10 +0100 Subject: [PATCH] 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 --- spring-boot-project/spring-boot-docs/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/pom.xml b/spring-boot-project/spring-boot-docs/pom.xml index 4fe3be1178..b280fcb8ea 100644 --- a/spring-boot-project/spring-boot-docs/pom.xml +++ b/spring-boot-project/spring-boot-docs/pom.xml @@ -1476,8 +1476,8 @@ html5 - adoc - htmladoc + .adoc + .htmladoc ${project.build.directory}/generated-docs/reference/html highlight.js @@ -1509,7 +1509,7 @@ html5 - htmlsingleadoc + .htmlsingleadoc ${project.build.directory}/generated-docs/reference/htmlsingle highlight.js