Login  Register

Re: Customize CSS in Asciidoctor JS

Posted by mojavelinux on May 13, 2019; 8:16pm
URL: https://discuss.asciidoctor.org/Customize-CSS-in-Asciidoctor-JS-tp6901p6914.html

It's even simpler than that:

-a stylesheet=my-stylesheet.css

That replaces the default stylesheet with your own.

Cheers,

-Dan

On Mon, May 13, 2019 at 9:13 AM Ted [via Asciidoctor :: Discussion] <[hidden email]> wrote:
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



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Customize-CSS-in-Asciidoctor-JS-tp6901p6912.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux