Source: www.amitmerchant.com

How to categorize your posts in Jekyll

Category: PHP, javascript

· August 27, 2020 · ⋆ Jekyll When I first started blogging using Jekyll, I was using a popular Jekyll theme called jekyll-now.

Using the category frontmatter variable, we can make a categories page called categories.md in the _pages directory where you can categorize and list each post by its category like so.

And in the loop, we can get the post based on the current category in the loop using the following loop.

You can place the following code in search.json in the root of your Jekyll blog.
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