Getting latest post for different style

I want to separate the latest article so I can make different style. for example if I have post A, B, and C, I want to have A for highlight style (using card) and the rest will be on ordinary list.

How to achieve this? I already sort it by date, but cannot separate the latest post.

You can check the index when iterating on the posts: https://tera.netlify.app/docs/#for in that case loop.index0 == 0

1 Like