I'm evaluating DocPad at the moment to see if it will be suitable for our website amongst other things. I'm having trouble working out how to use structured metadata in eco templates. I'm pretty sure it's related to How to display Backbone nested attribute using Eco? but that's unanswered too.
My page looks like:
--- yaml
layout: 'post'
title: "Samuel Johnson's garret - an unexpected lull"
category: 'Digital Publishing'
author:
name: Author Name
page: author
email: author.name@ourdomain.co.uk
---
Unexpected free time, a chilly walk, a brown plaque leads me to
[Dr Johnson's house (http://www.drjohnsonshouse.org/) near Fleet-Street…
and the eco template like:
---
layout: default
---
<article id="post" class="post">
<h1><%= @document.title %></h1>
<h2>By: <%= @document.author.email %></h2>
<div class="post-content"><%- @content %></div>
</article>
The @document.author.email
leads to the following error being logged:
TypeError: Cannot read property 'email' of undefined
How do I access that structured metadata?
thanks