1.5.0.preview.2 available with new extensions API

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

1.5.0.preview.2 available with new extensions API

mojavelinux
Administrator
I've cut the 1.5.0.preview.2 release of Asciidoctor and pushed it to rubygems.org. You can install it using:

 $ gem install asciidoctor --preview

The key focus of this release is the new extensions API. As I mentioned in the release blog for 0.1.4, the API was likely to change. In order to accommodate the new requirements, we did indeed have to shift things around. Here's a brief summary of what changed.

* Extensions can now be registered using any of the following:
  - String class name
  - Class
  - Instance of a Class
  - Ruby Proc (i.e., block)
* The configuration Hash for a Processor is now passed to the Processor constructor and subsequently read from the instance
* The Extensions.register method accepts a registry argument instead of a document argument
  - The document is accessible via the Registry instance (e.g., registry.document)
* The order of arguments for registering a Processor is now: Processor, name (optional), options Hash (optional)
* The Preprocessor and Postprocessor extensions now accept the Document as the first argument to the process method

Alex has been working on bringing these improvements to AsciidoctorJ. Once a preview release of AsciidoctorJ 1.5.0 is ready, we can start working on the Java side to allow extensions to be written using Groovy closures!

I spent some time documenting the extension APIs. You can review them on the following site:

http://rubydoc.info/github/asciidoctor/asciidoctor/master/frames

I've also pushed a bunch of extensions into the asciidoctor-extensions-lab repository to give you some ideas about how to use the APIs.

https://github.com/asciidoctor/asciidoctor-extensions-lab

I added a -r option to the asciidoctor command so that you can autoload an extension when processing a document. Here's an example:

 $ gem install asciidoctor --preview
 $ cd asciidoctor-extensions-lab
 $ asciidoctor -D . -r ./lib/shout-block.rb lib/shout-block/sample.adoc

The other big news in this release are the improvements for Asciidoctor.js. Asciidoctor.js can now resolve the include directive using XmlHttpRequest. You can also write extensions in JavaScript. We'll have more information about that functionality once we get it published.

If you've been waiting on testing some of issues that have been resolved over the last few months, now's your chance to give it a try. (You might notice some improvements in speed too :). I look forward to hearing your feedback!

There's still some work to do before 1.5.0 is ready, but we are a lot closer now!

Enjoy!

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

Re: 1.5.0.preview.2 available with new extensions API

wimalopaan
Great work !!!

Now I abandoned asciidoc completely and use asciidoctor all the time.

But, sadly the admonition-blocks and callouts are still not rendered as expected with the deck.js backend. This is an obstacle in doing presentations with asciidoctor for me. Any help in sight?

--
 Wilhelm


Reply | Threaded
Open this post in threaded view
|

Re: 1.5.0.preview.2 available with new extensions API

ch007m
In reply to this post by mojavelinux
Hi Dan,

Can we work closely together for asciidoctor 1.5 and integrate hyla project ? By integrating, I mean that we move hyla as a git asciidoctor project that we will use to build an asciidoctor gem distribution (like I did for hyla)  including these features :

- asciidoctor project (parser, processor, ...)
- command Line Tool : New, Create, Generate, Watch, SendEmail, ...
- asciidoctor-backends (erb, haml, slim)
- asciidoctor-stylesheet-factory
- asciidoctor-samples (collection of artefacts that a user will use to populate a project)

Why such packaging of the gem we will :
- Simplify life of technical writer which are not Ruby/Java developers and can work with asciidoctor without the need to be git expert
- Release more often to include modifications done for CSS, Template but not impacting necessarily asciidoctor processor/parser
- Propose a project which is also (like jekyll) a tool to create a project (blank, using a template), add artefacts (article, book, source, audio, video, ...), watch modifications with livereload, send email, ....

Doc about hyla is available here : https://github.com/cmoulliard/hyla/blob/master/documentation/introduction.adoc

Regards,

Charles
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: 1.5.0.preview.2 available with new extensions API

wimalopaan
Hi again,

please excuse my impatience: is there any hope to get the deckjs-backend fixed in the forseeing future? Or should I switch back to asciidoc/slidy2 for the next time?

Due to my very limited skills in the underlying software stack I can't help here very much except doing testing!

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

Re: 1.5.0.preview.2 available with new extensions API

ch007m
What is your issue with deckjs ?
FYI : Revealjs is also supported.
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: 1.5.0.preview.2 available with new extensions API

wimalopaan
Admonitions and callout-icons are not working: see [1]

How do I use revealjs?

[1] http://discuss.asciidoctor.org/Callouts-and-admonition-blocks-not-working-with-deckjs-backend-td1493.html

Reply | Threaded
Open this post in threaded view
|

Re: 1.5.0.preview.2 available with new extensions API

ch007m
revealjs has been added (backend, style, css, js) to hyla (= asciidoctor command line tool) --> https://github.com/cmoulliard/hyla/blob/master/documentation/introduction.adoc#3-revealjs



On Thu, Feb 20, 2014 at 3:53 PM, wimalopaan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Admonitions and callout-icons are not working: see [1]

How do I use revealjs?

[1] http://discuss.asciidoctor.org/Callouts-and-admonition-blocks-not-working-with-deckjs-backend-td1493.html




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/1-5-0-preview-2-available-with-new-extensions-API-tp1510p1522.html
To unsubscribe from 1.5.0.preview.2 available with new extensions API, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: 1.5.0.preview.2 available with new extensions API

wimalopaan
Thank you.

deckjs is mostly working now, at least the callouts are fine.

But: Something is missing in the stylesheet to render the admonition icons properly. See [1].

--
 Wilhelm

[1] http://discuss.asciidoctor.org/deckjs-backend-missing-stylesheet-tp1526.html