flatiron / blacksmith

A generic static site generator built using flatiron, plates, and marked.
MIT License
555 stars 41 forks source link

Using partials in a list content page causes error #84

Open Aintaer opened 11 years ago

Aintaer commented 11 years ago

Using an index.json:

{
  "content" : {
    "list" : "post",
    "limit" : 1
  },
  "partials" : {
    "navigation" : "navigation"
  }
}

Causes blacksmith to error out at:

node_modules\blacksmith\lib\blacksmith\page.js:158
          metadata:   source._content.metadata,
                                     ^
TypeError: Cannot read property 'metadata' of undefined

AFAIK, this happens due to blacksmith attempting to render the partials with metadata where none exists due to the page being entirely generated from posts, hence having no metadata of its own.