Collapsing figure/img tags into simplified fig-img tag

Date: August 11, 2017

A purpose of a system like AkashaCMS is simplifying the work of content authors to more efficiently write their content. The task of simplifying work is multi-faceted and can be taken in many different directions.

The task at hand was to collapse the <figure>/<img> combination into a simplified tag.

This combination is the preferred way of presenting images, especially when there's to be a caption.

The typical pattern is:

<img src="/path/to/some-image.jpg"/>
<figcaption>Caption text including Source: BBC</figcaption>

While the HTML isn't all that extensive it can be tedious to write this over and over. The simplification?

<fig-img href="/path/to/some-image.jpg"/>
Caption text including Source: BBC

For complete information see: AskashaCMS "built-in" plugin documentation - Foundational support for constructing any HTML

« Preparing AkashaCMS for 0.3.x, adding plugin support Building EPUB electronic books and websites on your laptop, no server-side tools required »
( comments powered by Disqus