Blogger Backend for AsciiDoc

Published: 2012-09-11

The AsciiDoc backend plugin for Google’s Blogger blog hosting service is hosted on Github, it generates Blogger friendly HTML markup from AsciiDoc source.

The backend consists of a single blogger.conf configuration file.

To install the Blogger plugin download and install it with asciidoc (you will need AsciiDoc version 8.6.6 or newer):

asciidoc --backend install

HTML generated by the blogger backend can be pasted directly into your Blogger post’s HTML edit box:

  1. Login and create a new post or edit an existing one.
  2. Select the HTML edit option.
  3. Convert your post’s AsciiDoc source to Blogger friendly HTML. For example, this command converts the article.txt source file to article.html:
    asciidoc -b blogger -a iconsdir=./icons article.txt


    Specifying the location of the admonition icons by setting the iconsdir attribute has been rendered unnecessary by a commit made on 11-September-2012.
  4. Open the generated HTML file in a text editor then select and copy all the text (typically with Ctrl+A then Ctrl+C).
  5. Paste the copied text into the Blogger edit window in the browser:

Here’s a partial screenshot of the post (you can view the example post here):



  • By default linked images and admonition icons will be embedded in the generated HTML using the data URI scheme (AsciiDoc data-uri and icons attributes are set in the plugin’s blogger.conf file).
  • Older browsers (notably IE8) limit the size of data URIs.
  • You will need AsciiDoc version 8.6.6 or newer to use the Blogger backend.
  • Defining the backend atom attribute will envelope the post in an Atom <entry> element for the Blogger 2.0 API — this feature is experimental and I never got round to trying it. See also Post on Blogger using curl.

2 Responses to “Blogger Backend for AsciiDoc”

  1. bairui Says:

    Woo hoo! I’ve been wanting this for a while now. Thanks, Stuart.

  2. slo.sleuth Says:

    This is very helpful, thank you. I have only one issue with this .conf file and I’m not sure what to change:

    The asciidoc listingblocks with the the blogger.conf can extend outside the blogger article frame where default ascii doc blocks will wordwrap. Can you tell me where to change the blogger.conf file to keep the default listingblock wordwrap behavior?

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: