Blot

Embed a file

Suppose you want to place an introductory paragraph above the paginated list of posts on your homepage. Rather than hard-coding this text directly into the template, you may prefer to load it dynamically from a file in your folder.

First, create a file containing the writing you want to embed. For example, add /Pages/Home.md with:

Page: Yes
Menu: No

Your introduction goes here.
You can use **Markdown** formatting as usual.

Setting the metadata Page: Yes prevents the file from becoming a post. Setting Menu: No keeps it out of your site’s navigation.

Your homepage is generated from the template view entries.html. To embed the HTML output from Home.md, insert:

{{> /Pages/Home.md}}

The {{> /Pages/Home.md}} directive pulls the rendered HTML of Home.md into the template at that position. If the file does not exist, Blot inserts an empty string. This syntax works identically to partial-template inclusion.