Can I get asciidoctor's default styling stylesheet?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Can I get asciidoctor's default styling stylesheet?

gregturn
I am using asciidoctor 0.1.4 (embedded using org.asciidoctor:asciidoctor-java-integration) to generate HTML from raw documents. I see that when I run this from the command line, the styling is shoved into the rendered document to alleviate the need for external style sheets. Cool!

But...in my app, the rendered HTML gets processed, i.e. the header material is stripped off, and a different set of headers and stylesheets gets applied to apply our "look".

Is there a way to get a hold of asciidoctor's default CSS stylesheet so I can simply add it to my site's layout?
Greg Turnquist (@gregturn)
Author of Darklight and Hacking with Spring Boot 2.3
Sign up for my newsletter and get a FREE e-book
Reply | Threaded
Open this post in threaded view
|

Re: Can I get asciidoctor's default styling stylesheet?

mojavelinux
Administrator

Indeed! You just need to run the command once using the following parameters:

asciidoctor -a linkcss sample.adoc

Linking implies copying the default stylesheet to the current directory.

You'll find asciidoctor.css in the same directory after you run the command. You can take that file and put it wherever you need it.

Another way to make the file is the same way we prepare it for Asciidoctor itself, the Asciidoctor stylesheet (theme) factory. See details here:

http://asciidoctor.org/docs/produce-custom-themes-using-asciidoctor-stylesheet-factory/

You can preview the themes at http://themes.asciidoctor.org.

Happy theming!

-Dan

On Nov 6, 2013 7:59 AM, "gregturn [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
I am using asciidoctor 0.1.4 (embedded using org.asciidoctor:asciidoctor-java-integration) to generate HTML from raw documents. I see that when I run this from the command line, the styling is shoved into the rendered document to alleviate the need for external style sheets. Cool!

But...in my app, the rendered HTML gets processed, i.e. the header material is stripped off, and a different set of headers and stylesheets gets applied to apply our "look".

Is there a way to get a hold of asciidoctor's default CSS stylesheet so I can simply add it to my site's layout?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Can-I-get-asciidoctor-s-default-styling-stylesheet-tp940.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Can I get asciidoctor's default styling stylesheet?

gregturn
Perfect! Getting the stylesheets is exactly what I needed.

One follow up question: I am running this embedded, but it complains that I don't have pygments.rb inside this embedded jruby instance. Is there an extra step I need to basically "gem install pygments.rb" in this embedded instance?
Greg Turnquist (@gregturn)
Author of Darklight and Hacking with Spring Boot 2.3
Sign up for my newsletter and get a FREE e-book
Reply | Threaded
Open this post in threaded view
|

Re: Can I get asciidoctor's default styling stylesheet?

mojavelinux
Administrator
On Wed, Nov 6, 2013 at 9:32 AM, gregturn [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Perfect! Getting the stylesheets is exactly what I needed.

\o/
 

One follow up question: I am running this embedded, but it complains that I don't have pygments.rb inside this embedded jruby instance. Is there an extra step I need to basically "gem install pygments.rb" in this embedded instance?

This is where Alex may need to jump in. The pygments.rb gem isn't bundled in AsciidoctorJ like the coderay gem, though we should probably look into doing that. What I'm not sure if AsciidoctorJ will see it if you put it in another jar.

You may know this already, but keep in mind that the pygments.rb still calls down to the pygments library in the system (though in a pretty nice way). That's why, ideally, CodeRay is a better choice if you can use it.

If you file an issue in the asciidoctor-java-integration repo to add pygments.rb, we can probably get it in the 1.5.0 release.

Cheers,

-Dan


--
Reply | Threaded
Open this post in threaded view
|

Re: Can I get asciidoctor's default styling stylesheet?

ch007m
I also have the same issue (using maven asciidoctor plugin) --> https://gist.github.com/cmoulliard/7641817 ?

Remark : I will use until now coderay
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: Can I get asciidoctor's default styling stylesheet?

mojavelinux
Administrator
The pygments.rb gem will be bundled in the next release of asciidoctorj.

https://github.com/asciidoctor/asciidoctorj/issues/123

-Dan


On Mon, Nov 25, 2013 at 7:24 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I also have the same issue (using maven asciidoctor plugin) --> https://gist.github.com/cmoulliard/7641817 ?

Remark : I will use until now coderay


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Can-I-get-asciidoctor-s-default-styling-stylesheet-tp940p1086.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--