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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners