Front Matter in partials?
spacedawwwg opened this issue · comments
Paul Welsh commented
is there a way to access front matter from within a partial?
In the layout I can access {{frontMatter.title}}
but when I try the same from within a partial it does not work?
I have also tried {{../frontMatter.title}}
to no prevail.
Is there any way to do this at all?
Shannon Moeller commented
Some options:
- Use partial parameters:
- Use the
@file
reference:
- Use the
handlebars-layouts
embed
helper instead of the partial syntax:
Shannon Moeller commented
Closing due to inactivity and no similar reported bugs. Feel free to reopen if you're still having issues!
Paul Welsh commented
Sorry for not responding. Using partial parameters worked for me, the @file reference didn't.
Happy using partial parameters though.