Login  Register

Re: Customize CSS in Asciidoctor JS

Posted by Ted on May 13, 2019; 3:13pm
URL: https://discuss.asciidoctor.org/Customize-CSS-in-Asciidoctor-JS-tp6901p6912.html

gquintana wrote
I just want to add something like:
<link rel="stylesheet" href="./my-css.css">
to  HTML header.

Is it possible?
Yes, you can use the docinfo.html file to inject CSS into your rendered files. See Docs: https://asciidoctor-docs.netlify.com/asciidoctor/1.5/docinfo/

Take a look at this example code https://github.com/tedbergeron/AsciidoctorSemanticColors 

In the Docinfo.html file I've added <style> to change some colors and add a new color. You could link to a separate CSS file instead of embedding the style as I did.
- Ted @TedAtCIS