Skip to content

APIs for Backend Templates

Sarah White edited this page Jun 28, 2013 · 1 revision

APIs for Backend Templates

Available, Semi-Available, and Wished-for Backends

Custom backends currently available in the Asciidoctor backends repository:

Table 1. Custom backends in Asciidoctor backends repository
Backend Description Doc(s)

deckjs

Collection of Haml templates that transform an AsciiDoc document to HTML 5-based slides animated by deck.js

How do I create slides with the deck.js backend?

dzslides

HTML template to build slides in HTML5 and CSS3

None

Custom backends rumored to exist or be in development

Custom backends wish list

Mapping of AsciiDoc Elements to Templates

Template Name Corresponding AsciiDoc Element(s) Description

block_admonition

block_colist

block_dlist

block_example

block_floating_title

block_image

block_listing

block_literal

block_olist

block_open

block_page_break

block_paragraph

block_pass

block_preamble

block_quote

block_ruler

block_sidebar

block_table

block_ulist

block_verse

block_video

document

embedded

inline_anchor

inline_break

inline_callout

inline_footnote

inline_image

inline_indexterm

inline_quoted

section

Section title and content

Used for rendering section title and its child content

Main APIs available to each backend template

Current object in a template is an Asciidoctor node element A node can be a block or an inline concrete type

  • attribute lookup shorthands (what a ? means)

  • checking for an attribute

  • getting the value of an attribute

  • checking for a block title

  • getting the block title

  • getting the id

  • checking for nested blocks

  • getting the nested blocks

  • checking for text

  • getting the text

  • text is inline and list items only

  • checking for an option

  • getting the caption

  • checking for a document attribute

  • getting a document attribute

  • getting the content (renders children)

  • special stuff for document and section

  • functions (image_uri, icon_uri)

  • document references

  • type (mutlivariate templates (handling more than one thing)

  • getting the doctype

Note
reference rdoc for where the methods exist