Login  Register

Asciidoc, template based site (awestruct) and font-awesome

Posted by Emmanuel Bernard on Jul 19, 2013; 7:13pm
URL: https://discuss.asciidoctor.org/Asciidoc-template-based-site-awestruct-and-font-awesome-tp383.html

I know this is somewhat sacrilege but I am looking for a way to integrate font-awesome icons into an asciidoc document that is the template for an html page (generated by Awestruct).

Font Awesome is used in HTML like this  and this tag is replaced by a nice icon. Thing of it conceptually as an image, except it uses font and unicode.

I tried to use the ability to attach roles to text

[source, asciidoc]
----
= [icon-camera-retro]#sometext# Nice camera
----

It works but also displays some text after the icon. Trying to replace it with nothing or with an empty space did result in a parser misinterpretation.

Do you have a solution to this challenge?

Emmanuel