I am trying to create a tutorial to set up Metalsmith , and I got to the end of the first part.
I installed node.js and modules. The IDE is Visual Studio 2013 with the node.js tools installed. I placed the main structure and I am trying to get one page to render using a template.
The instructions indicate to insert the following into the file:
---
title: Home
template: home.hbt
---
This is your first page
With a template like:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>{{ title }} | Metalsmith Page</title>
</head>
<body>
<div class="main-wrapper">
{{{ contents }}}
</div>
</body>
</html>
The tutorial says that it should appear on the html page, but the result that I get looks something like this:
When I use the markup renderer, it gives
<p>---
title: Home</p>
<h2 id="template-home-hbt">template: home.hbt</h2>
<p>This is your first page</p>
, YAML front-matter. , .