I need to differentiate between posts that have front matter + content
and posts that only have front matter.
content/post/post1.md
+++
company = "Acme Inc"
date = "2017-10-01T01:08:19+02:00"
product = "Apples"
+++
content/post/post2.md
+++
company = "Acme Inc"
date = "2017-10-01T01:08:19+02:00"
product = "Pears"
+++
Content about pears.
I’m trying to do something like this:
{{if .Content}}
<p>Has content</p>
{{else}}
<p>No content</p>
{{end}}
But the above does not work. It just displays No content
. I assume there must be an easy way to do this? Thanks.