Blocks allow you to create and control modular sections of content

Within your templates you can create labelled blocks of content with the ability to output them. Content not in a block by default is pushed into the block labeled content.



Lorem ipsum dolor


* Lorem
* Ipsum
* Dolor
{{ #blocks }}
    {{ name }}
    {{ output|raw }}
{{ /blocks }}

Appending & Rendering

By default blocks push into an iterable array of blocks given the same name. If you prefer to concatenate the content use the append filter. The render filter allows outputting the block inline as well as pushing it to the tag pair, useful when generating style guides.


Custom Tags

You can create custom tags accessible in the blocks loop with the following format. Multiple tags are allowed.


Due to the parse order of the generator the examples above use leading -~- instead of the proper ---.


With the content tag pair a section’s content can be looped through.

{{ #content|tag }}
    <h1>{{ name }}</h1>
        {{ output|raw }}
{{ /content }}

Input & Output

The input tag returns the raw markdown content before processing. The output tag returns the processed content.

{{ #content }}
    {{ input }}
    {{ output }}
{{ /content }}

Since HTML entities are encoded by default the raw tag helper is needed to render markup.


The data tag is used to access any custom data inside of the data keys in the site file. This includes the site data, as well as data for individual sections. It can be used as a single tag or as a tag pair.

{{ data.version }}
{{ data.analyticsID }}


The parent tag can be used to access the parent section of the current section.

{{ #parent|notEmpty }}
    {{ }}
{{ /parent }}


This is where you will specify the different sections of your site, and information related to each section. As the example below demonstrates, sections can be nested.

"sections": {
    "home": {
        "name": "Homepage",
        "data": {
            "seoTitle": "SEO Friendly Title",
        "template": "index",
        "target": "public_html/index.html",
        "contentRoot": "home",
        "content": ""
    "blog": {
        "name": "Blog",
        "template": "blog",
        "target": [
        "content": "content/blog/*.md",
        "sections": {
            "entries": {
                "name": "Entries",
                "template": "entry",
                "target": [
                "content": "blog/*.md"


The name for the section is set here and available to the template.

"name": "Section Name"


Any custom data that you may need for a section can be stored in the data object. They are accessible via tags.

"data": {
    "sectionVariable": "value"
{{ data.sectionVariable }}


This is where you specify a section’s template. The html extension is assumed by default.

"template": "index"


This specifies the file to which the content will be written to.

"target": "public_html/index.html"


The files listed here contain the content that will be made available to the defined template. Files are compiled in the order that they are listed. A string or an array can be provided and all standard globbing patterns are supported.

"content": [


The site tag enables access to any property specified at the root level of the site file.

Name & Description

<h1>{{ }}</h1>
<span>{{ site.description }}</span>


    {{ #site.sections }}
    <li>{{ name }}</li>
    {{ /site.sections }}


This will return the current development environment. Using this with the is filter, you can conditionally output content.

{{ #site.env|is(prod) }}
<script>// Script loaded only in production environment</script>
{{ /site.env }}

It also allows quick access to any data associated with an environment.

<link rel="stylesheet" href="{{ site.assetUrl }}/style.css">


This will return the current time.

{{ site.time }}

Target, Path & URL

Target tells you where the file is written in the file system. Path gives you the relative path. URL includes the domain.

{{ target }}
{{ path }}
{{ url }}