Publican v0.6.1 update
405 words, 3-minute read

Publican v0.6.1 was released on . Please see the breaking changes.
Markdown conversion improvements #
Markdown containing ${ expressions }
can cause problems when converting to HTML. Version 0.6.0 attempted to comment out expressions, but this was not reliable and could prevent markdown-it adding surrounding tags.
The markdown conversion has been rewritten. Publican v0.6.1 extracts all expressions before the HTML is generated. Expressions are then reinserted. Those inside <code>
blocks are HTML-encoded unless you’ve used a ${{ double bracket }}
.
The benefits:
- expression rendering and syntax coloring has improved
- the quantity of HTML code has reduced in some cases, and
- performance is better. A full site build is up to 15% faster than v0.6.0.
Refer to jsTACS Template literals in markdown for more information.
Front matter debug
value #
In v0.6.0 and below, setting a debug
value in front matter presumed debugging was enabled no matter what value you used.
From v0.6.1, setting:
debug: false
disables debugging. Any other value – even an empty string – enables debugging.
Breaking changes #
In v0.6.0 only, an expression on a single line such as:
markdown source
${ data.title }
is rendered without surrounding tags:
HTML output
This Page's Title
v0.6.1 renders the expression inside HTML paragraph tag:
HTML output
<p>This Page's Title</p>
If you need a different tag, you can use an HTML snippet in the markdown, e.g.
markdown source
<div>${ data.title }</div>
Or you can use HTML comments when no tags are required. These are ignored by the browser and removed during minification.
markdown source
<!-- -->${ data.title }<!-- -->
Note that malformed or invalid expressions are more likely to break Publican’s build process.
Get started #
The Publican documentation provides a quick start guide, a detailed set-up guide, API references, and common recipes you can use and adapt for your own projects.