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

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