• Andy Wilkinson's avatar
    Tighten up sourceDocumentExtensions used for single and multi-page docs · 78871d7a
    Andy Wilkinson authored
    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
    78871d7a
pom.xml 51.4 KB