Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AsciiDoc to html5 external css

I'm trying to convert my AsciiDoc to html5 with the following command :

asciidoc -b html5 -a icons -a toc2 -a stylesheet=article.css myPost.adoc

It doesn't find my css file cause it look it wrong place : asciidoc: WARNING: myPost.adoc: line 1: include file not found: /usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/article.css

Also ascii put some css in the generated html file so how can I remove it (or pass it to external file) cause I ave multiple file to convert and don't want to duplicate this.

like image 973
jaumard Avatar asked Feb 04 '26 18:02

jaumard


1 Answers

There also is an option stylesdir=... for asciidoc.

Looking at your error message, I wonder if you put article.css into /usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc?

Maybe article.css is located somewhere else?

If so, call it like this:

asciidoc -b html5 -a icons -a toc2 -a stylesheet=article.css -a stylesdir=/path/to/article.css myPost.adoc


This is explained in the asciidoc docs.

like image 159
rocksteady Avatar answered Feb 06 '26 07:02

rocksteady



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!