Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hi,
Is it a huge task to propose a slidy or slidy2 backend ? Do we have instructions somewhere excepted github issue here - https://github.com/asciidoctor/asciidoctor-backends/issues/12 (doc, ...) ? Regards, Charles
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hello, no we don't have instructions to build a new template yet, but you only need to do two things, the first one choose between slim or haml. Then when you have chosen one you can start creating your backend. It is as simple as for each AsciiDoc element, you can create a file with the same name. Then when Asciidoctor finds that element, the output will be replaced by the one of the template. See for example deckjs example: https://github.com/asciidoctor/asciidoctor-backends/tree/master/haml/deckjs
you will find some files like section.html.haml is used when a new section is found by renderer, document.html.haml when a new document is found, and so on. So although there is no documentation (which should be fixed), inspecting already running templates you can create your own. And all thanks of Tilt gem. Hope this has been helped you to start to write for example one for Slidy. Alex |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
Thanks for the response, Alex! You summarized the current state of things very well. One thing to note is that when you create a completely new backend, you have to implement a template for every node you use in your document. Otherwise, Asciidoctor will fail with the error that the view could not be found.The reason this happens is because new backends, like slidy, do not inherit from the built-in backends (in particular, html5). One way to move forward quickly is to copy all the templates from the html5 backend into your new backend folder and begin customizing them one by one. That way, you'll never be missing one. You know which templates you need to implement by looking at the html5 backend (erb, slim or haml): * https://github.com/asciidoctor/asciidoctor-backends/tree/master/haml/html5 * https://github.com/asciidoctor/asciidoctor-backends/tree/master/slim/html5 * https://github.com/asciidoctor/asciidoctor-backends/tree/master/erb/html5 These templates aren't used by Asciidoctor by default. However, I keep them up to date to mimic the behavior of the built-in html5 backend and to use as a starting point for new backends. You certainly don't have to implement the backend in multiple template languages. Just choose the one you like best. I personally recommend slim. On Mon, Nov 18, 2013 at 1:41 PM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hello, no we don't have instructions to build a new template yet, but you only need to do two things, the first one choose between slim or haml. Then when you have chosen one you can start creating your backend. It is as simple as for each AsciiDoc element, you can create a file with the same name. Then when Asciidoctor finds that element, the output will be replaced by the one of the template. See for example deckjs example: https://github.com/asciidoctor/asciidoctor-backends/tree/master/haml/deckjs ... [show rest of quote] -- Dan Allen | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Thx for the response. As I have started to work with HAML, I will continue to use this markup language. Question: I don't see in the asciidoctor documentation a description of the different blocks/macros/nodes. Does it exist ? Can you tell me if each node/block corresponds to an asciidoc block or inline and if we have new blocks ? What is the difference between document and embed ?
block_admonition.html.haml block_audio.html.haml block_colist.html.haml block_dlist.html.haml block_example.haml.haml block_floating_title.html.haml
block_image.html.haml block_listing.html.haml block_literal.html.haml block_math.html.haml block_olist.html.haml block_open.html.haml block_page_break.html.haml
block_paragraph.html.haml block_pass.html.haml block_preamble.html.haml block_quote.html.haml block_ruler.html.haml block_sidebar.html.haml block_table.html.haml
block_toc.html.haml block_ulist.html.haml block_verse.html.haml block_video.html.haml document.html.haml embedded.html.haml inline_anchor.html.haml
inline_break.html.haml inline_button.html.haml inline_callout.html.haml inline_footnote.html.haml inline_image.html.haml inline_indexterm.html.haml inline_kbd.html.haml
inline_menu.html.haml inline_quoted.html.haml section.html.haml Remarks : - I suggest to add a table in asciidoctor documentation to define the different node type (block, inline, section, ...) and mention if they correspond or not to asciidoc or are new
- Would be great to support jade (http://jade-lang.com/) like we use for scalate project (http://scalate.fusesource.org/) which is even more dry than HAML/SLIM.
On Sun, Nov 24, 2013 at 11:40 PM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
... [show rest of quote] Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Free forum by Nabble | Edit this page |