In my blog index, my goal is to show short posts (say, less than 500 words) in their entirety, but longer posts to offer a link to the full post. Ex:
Short post
(short post content)
Short post
(short post content)
Long post
(first few hundred words)
(read more)
Short post
(short post content)
Long post
(first few hundred words)
(read more)
Short post
(short post content)
I’m having trouble with figuring out how to do this within my blog index loop, as it doesn’t seem like I can use an operator when using the content helper. What I want to do is write something like the following:
{{#if content words > "500"}}
<article>{{content}}</article>
{{else}}
<article>
{{content words="300"}}
<a class="read-more__link" href="{{url}}">
</article>
{{/if}}
Does anyone have any guidance on this?