Jekyll: Post Loop in Liquid Templates

Posted in Notes on 17 October 2019

This post has been archived

The content of this post has not been updated since 2019, and may be out of date. Extra care should be taken with any code provided.

Jekyll uses the Liquid templating language to process templates. This post provides a basic example to show the five latest blog posts and highlight the first post.

The code consists of two loops, the first loop shows one post (the newest one) the second post shows the next four posts.

Related Notes Posts

November 2024

Simple steps to protect your privacy online

In today’s digital world, protecting your privacy online has become essential. With personal data constantly being shared, stored, and potentially accessed by unauthorised parties, safeguarding...

Continue reading

November 2024

Introduction to Bluesky

Making the most of Bluesky after coming from whatever Twitter (𝕏) has become involves exploring the platform's unique features, adapting to its smaller, community-driven culture,...

Continue reading

November 2024

Web application security testing

With the increasing dependency on web applications in daily operations, securing these applications is paramount to safeguarding data and protecting against breaches. This blog post...

Continue reading

More Notes Posts