Closed bmlyon closed 2 years ago
My bad I figured it out, I was looking at the wrong template file (index instead of post).
For anyone else who runs into this:
{{post.body}}
. Index.hbs is used to generate the index page. It doesn't matter if you have this set to a paginated list or a single entry, it treats the single entry as a part of a list.{{this.body}}
. The name this can be misleading. It's for the post, not the page.{{{body}}}
. Note the triple brackets instead of double brackets. Post.hbs is fetched by the page and is ultimately how the post will display.
When I use the
{{{body}}}
tag, it includes the title. Is there a way to get the body without including the title?My alternate workaround would be to switch from using
{{meta.title}}
to something else like{{meta.pageTitle}}
. The problem is that I can't omit thetitle:
frontmatter without causing the errorFailed to get related posts TypeError: Cannot read property 'length' of null
. If I leave title blank via two quote marks and nothing in-between them, then the h1 tag still prints but it's empty. I also tried a value of undefined but it assumed that was a string instead of undefined.