How to conditionally apply html code after every 3 posts?

So following up with a little bit more complex of a conditional, @bep

I’d like to sort all site pages by most recent publish date and and only grab the first 3 {{ first 3 range .Site.Pages.ByPublishDate.Reverse}} but I also only want the article if the section is equal to “tutorials” or “articles” {{if or (eq .Section "articles") (eq .Section "tutorials")}}. I’m having trouble combining these two conditions. Thoughts?

SOLVED

1 Like