Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
This post was updated on Oct 10, 2018; 3:17pm.
Hello -- I'm trying to apply a custom CSS file to a set of docs with a couple of subdirectories. I'm using the Asciidoctor Gradle Plugin (v1.5.7) plugin to do the batch conversion.
I set the following in build.gradle: attributes 'stylesheet' : 'custom.css', 'stylesdir' : './css' This works great for all docs in the root directory, but all docs in subdirectories throw a "stylesheet does not exist or cannot be read" during the build process. So, I tried overriding the build.gradle setting in each subdirectory doc with something like the following: :stylesdir: ../css OR :stylesdir: ../../css ...depending on how nested the doc file is. But these per-file values are ignored! They only seem to be acknowledged when there is no value specified in build.gradle, i.e., the only way I can get these styles applied to all docs is to not specify stylesdir in build.gradle and instead specify it in every single doc file. I really don't like doing that, both because it's a little sloppy and because these docs are for an open-source project which anyone can contribute to, and we'd really rather not have per-file dependencies/quirks like this. Any idea what I can try to avoid this? I've tried getting rid of the css/ directory (putting the css file in the root directory), setting the stylesdir as an option instead of an attribute, setting the stylesheet and stylesdir together in subdirectory docs, and a bunch of other things...nothing works. Per-doc settings are always ignored when they're set in build.gradle—both for docs in the root directory AND docs in subdirectories ![]() Any ideas what could be happening? Or is this how it's supposed to work? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
If you want to be able to override an attribute in a document, you need to lower the precedence of the attribute assignment in the Gradle build file. For an explanation, see https://asciidoctor.org/docs/user-manual/#altering-the-attribute-assignment-precedence Cheers, -Dan On Wed, Oct 10, 2018 at 8:52 AM m52go [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hello -- I'm trying to apply a custom CSS file to a set of docs with a couple of subdirectories. I'm using the Asciidoctor Gradle Plugin (v1.5.7) plugin to do the batch conversion. ... [show rest of quote] -- Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thank you so much Dan!! I had no idea about that. Works like a charm.
![]() |
Free forum by Nabble | Edit this page |