Source: www.amitmerchant.com

Implementing pinned posts in Jekyll

Category: PHP, javascript

· December 12, 2020 · ⋆ Jekyll Since my blog is built on to of Jekyll, many a times, I have been in a situation where I would try to implementcertain features according to my needs.

This will essentially mark the post as “pinned” and now we can use this flag to list pinned posts on top of all the other posts.

To do so, I added a check to only render the posts which are not marked as pinned in the main loop which renders all of the posts like so.

Implementing pinned posts in Jekyll Showing related posts based on the category of current post in Jekyll How to categorize your posts in Jekyll Live reload local Jekyll site in browser on file changes How to include HTML files in Jekyll Delaying notifications channel-wise in Laravel 8.x Implementing pinned posts in Jekyll Get up and running with Laravel blazing fast using Sail Make PHPUnit test reports more detailed using TestDox Run or exclude certain tests in PHPUnit
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners