spring-io / spring-asciidoctor-extensions

Asciidoctor Extensions developed by the Spring team
46 stars 18 forks source link

Invalid when compiling with subfolders #88

Closed lwpk110 closed 2 years ago

lwpk110 commented 2 years ago

my gradle script below:


configurations {
    asciidoctorExt
}

dependencies {
    asciidoctorExt 'io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:0.6.0'
}

asciidoctor {
    baseDirFollowsSourceFile()
    asciidoctorj {
        gemPaths = ['...']
    }
    sourceDir file('./')
    sources {
        include 'readme.adoc', 'src/docs/readme.adoc', '**/README.adoc', '**/*-exam.adoc'
    }
    outputDir file('build/html')
    configurations 'asciidoctorExt'
}

when i run task, 'readme.adoc` to readme.html can work fine, but others invalid, include the 'src/docs/readme.adoc' that the same content but in other subdirs. how can i resolve it?

i found that it can add js and css for only one file. in my script , when i remove 'readme.adoc', it can only add css and js in 'README.adoc'.

wilkinsona commented 2 years ago

Thanks for the report. We'll need some more information to be able to help. For example, the version of the Asciidoctor Gradle plugin that you're using, and, if it's required to reproduce the problem, your gem paths configuration, etc. Can you please provide a complete yet minimal Gradle project on which we can run asciidoctor and reproduce the problem?

lwpk110 commented 2 years ago

Thanks for the report. We'll need some more information to be able to help. For example, the version of the Asciidoctor Gradle plugin that you're using, and, if it's required to reproduce the problem, your gem paths configuration, etc. Can you please provide a complete yet minimal Gradle project on which we can run asciidoctor and reproduce the problem?

Thanks for your reply. i created a demo repo for this issue, https://github.com/lwpk110/asciidoctor-boot-demo

wilkinsona commented 2 years ago

Thanks for the sample. This is a duplicate of https://github.com/spring-io/spring-asciidoctor-extensions/issues/64 and is caused by a bug in AsciidoctorJ. You can fix the problem by using the latest version (3.3.2) of the org.asciidoctor.jvm.convert plugin.

lwpk110 commented 2 years ago

yes, it's work fine, thanks for your help..