New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.5.6] Warning "stylesheet does not exist or cannot be read" #2323
Comments
Very likely you're not setting the safe mode option to unsafe when invoking Asciidoctor. That is required in order to resolve a path which is above the document directory (or base directory). I see you are using node, so you must be using Asciidocotor.js. Can you provide more details about how Asciidoctor is being invoked? |
Actually, never mind. This is definitely a regression. I don't know what's happening yet, but it is definitely new in 1.5.6. |
Aha, now I see. This isn't a regression. 1.5.6 just fixed a missing warning message (#2089). The processor was always failing to copy the stylesheet in your case, it just wasn't telling you about it until now. The reason it isn't copying the stylesheet is because you have your settings backwards. When using linkcss, the other attributes should be defined as follows:
Thus, the settings in your case would be as follows:
That will copy the stylesheet to css/myTheme.css and link to it. If you don't want to copy the stylesheet, then unset copycss. In that case, stylesdir and stylesheet point to the source location of the stylesheet. |
Actually, there is a case to make for compatibility. Although the warning was missing before, it was still working for you. That's because the destination path already exists, so there's no need to copy. So I can add a check for that. |
…and dest already exists - change warning to preserve legacy scenario
I changed it so that it will only warn if the destination file doesn't already exist. We'll assume that if the destination file already exists, and there is no source file to copy, that you didn't want to copy the stylesheet at all. The workaround for you is to simply unset copycss:
|
It's Ok with |
And thank you for reporting! I'm glad this fix could make it into 1.5.6.1. |
…and dest already exists - change warning to preserve legacy scenario
…and dest already exists - change warning to preserve legacy scenario
…and dest already exists - change warning to preserve legacy scenario
In version 1.5.6, i have always a warning
Parameters of my adoc
Why
Asciidoctor
search CSS in document directory (F:/Documentations/asciidoc/sources/fr/documents/Generic
)and not in stylesdir (
../../../resources/css
-->F:/Documentations/asciidoc/sources/resources/css
) ?Jérôme
The text was updated successfully, but these errors were encountered: