Skip to content

Instantly share code, notes, and snippets.

@LightGuard
Last active December 15, 2015 20:58
Show Gist options
  • Save LightGuard/5322029 to your computer and use it in GitHub Desktop.
Save LightGuard/5322029 to your computer and use it in GitHub Desktop.
WIP asciidoctor backend documentation and exploration, based upon dzslide rendering

Asciidoctor Backend Documentation

What is a backend?

How do I create a new backend?

Which sections are used?

What variables are available to me in backends?

If what is being rendered is a block, content is available, which will continue to iterate down the tree until it end and take the generated content of all the children and put it into the content variable.

If it is an inline, text is available.

There always other variables available such as attr.

Probably the same ones as the previous deck as well as

  • block_literal

  • inline_break

  • inline_image

  • block_open

  • block_admonition

inline_anchor

[{followup}]
Head over to http://localhost:4242 to see your progress!

Of course it’s the "http://localhost:4242" section

block_example

 [NOTES]
 ====
 * Sharable
 * forkable
 * patchable
 * publishable
 ====

I think that one speaks for itself

inline_callout

 [{syntaxoff}]
 ----
 %script{:type=>'text/javascript',
   :src=>'//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.4/bootstrap.min.js'} (1)
 ...
 ----

It’s the number callout in the example

block_colist

 ...
 ----
 <1> Note the use of a CDN to grab the bootstrap script +
 <2> site.coffeescript has been compiled to site.js

The text that typically is below the example

block_pass

 ++++
 <hgroup>
   <h2>Fast, cheap, customizable, collaborative & secure</h2>
   <h3>Blog like a hacker!</h3>
 </hgroup>
 ++++

A pass-through block

@LightGuard
Copy link
Author

Eventually. I don't think I'm done yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment