sebastiandaschner blog


Blog written entirely in AsciiDoc

#asciidoc saturday, december 20, 2014

It took me several months to get an idea of how an ideal blog technology would look like for me.
I’m partly working in the web development but still I didn’t want to write every single blog post with HTML. Then I came across AsciiDoc.

It’s a really simple, human-readable and beautiful markup language for many kinds of text-centered content.

So I wanted to create a fully automatic "build" system for a blog which would be written in this language.

I ended up using the Asciidoctor Maven Plugin which generates HTML pages with the desired layout. The index page which links to the last entries is also generated on-the-fly by a small AsciidoctorJ extension which I wrote. The extension registers an AsciiDoc block macro which extracts information from the entries and inserts teasers.

So you just have to write an entry/article in AsciiDoc and the build process does the rest ;-)

Have a look at the Asciidoctor Blog Extension hosted on GitHub.

If you want to have an impression, here is the source of this entry:

= Blog written entirely in AsciiDoc
Sebastian Daschner <mail@sebastian-daschner.de>
2014-12-20

[[abstract]]
It took me several months to get an idea of how an ideal blog technology would look like for me.
I'm partly working in the web development but still I didn't want to write every single blog post
with HTML. Then I came across AsciiDoc.

It's a really simple, human-readable and beautiful markup language for many kinds of text-
centered content.

So I wanted to create a fully automatic "build" system for a blog which would be written in this
language.

I ended up using the Asciidoctor Maven Plugin which generates HTML pages with the desired layout.
The index page which links to the last entries is also generated on-the-fly by a small
link:https://github.com/sdaschner/asciidoctor-blog-extension[AsciidoctorJ extension] which I
wrote. The extension registers an AsciiDoc block macro which extracts information from the entries
and inserts teasers.

So you just have to write an entry/article in AsciiDoc and the build process does the rest ;-)

Have a look at the
link:https://github.com/sdaschner/asciidoctor-blog-extension[Asciidoctor Blog Extension]
hosted on GitHub.

And the source of the Index page which calls the macro looks like follows:

link:../index/index.adoc[]

 

Found the post useful? Subscribe to my newsletter for more free content, tips and tricks on IT & Java: