Re: Including Vimeo videos in a document

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/Including-Vimeo-videos-in-a-document-tp492p519.html

I also realized that this is going to be great for deck.js and other HTML 5-based presentations. Of course, that means updating the following template:

https://github.com/asciidoctor/asciidoctor-backends/blob/master/haml/deckjs/block_video.html.haml

Once that is done, you can have videos in your slides!

-Dan


On Sun, Aug 25, 2013 at 1:52 AM, Dan Allen <[hidden email]> wrote:
Xavier,

You got that exactly right. Asciidoctor provides default templates out of the box for (sort of) HTML 5 and DocBook (4.5 and 5). These templates are meant to be used for anyone who just wants it to work. They use highly optimized (and sometimes ugly) code to render as fast as possible. If the intention is to change "out of the box" output, as in this case, then you would need to hack on html5.rb (as you have done).

The support for external templates is the first, and most important, extension point in Asciidoctor. It allows users to create whatever output they want. To help them along the way, I try to keep a set of templates that match the built-in templates. I've been updating the Slim, Haml and ERB sets in asciidoctor-backends. Think of these as starting points for customization. Naturally, if a change is made to the built-in templates, then the sets in the asciidoctor-backends should be updated accordingly.

Thank you for your pull request! I've merged it in, then followed up with support for youtube as well as some other enhancements. Here's an example of a video macro as you can write it now:

video::12345[youtube, 480, 360, start=60]

As with other freshly added features, we're totally open to idea about how to improve on it.

I've cut a 0.1.4.rc.1 release of the Asciidoctor gem so you can try out the video tag and the many other enhancements. You can install it using:

gem install asciidoctor --pre

Enjoy! And thanks, again!

-Dan



On Fri, Aug 23, 2013 at 8:44 AM, xcoulon [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi Alex and Dan,

I'm a bit confused now: asciidoctor repo contains the html5.rb file that outputs blocks in pure HTML5 format, while the asciidoctor-backends contains slim and haml templates (amongst others).
Now, in the context of an awestruct project where I use the asciidoctor (0.1.3) gem, where should I make the change,  I guess the change should be made in asciidoctor/backends/html5.rb, shouldn't it ?

Then, for other use-cases relying on asciidoctor-backends, the change should be ported to the slim and haml templates as well, shoudn't it ?

Thanks,
Best regards,
Xavier


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






--
Dan Allen | http://google.com/profiles/dan.j.allen