In Jekyll it is possible to have a file that looks like
---
title: Whatever
layout: null
---
<h1>{{ title }}</h1>
The {{ title }} will be interpolated, but the layout: null means that the file contents won’t be wrapped in any kind of template.
What is the equivalent in Hakyll? In other words, if I have a self-contained file like
<h1>$title$</h1>
what kind of block do I need to pass to compile in order to have the $title$ value interpolated, without wrapping the page’s contents in some template?
                        
The answer (thanks to erasmas in the #hakyll channel!) is to compile your page using
where
theContextis the instance ofContext Stringthat contains the fields you want.Here’s a toy example of how you’d use this compiler: