Skip to content

Using partials in a list content page causes error #84

@Aintaer

Description

@Aintaer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions