Adding Multiple Categories in Posts

Posted by : on

Category : jekyll   guides   sample_category


Adding Multiple Categories in Posts

To add categories in blog posts all you have to do is add a category key with category values in frontmatter of the post :

---
category: ['jekyll', 'guides', 'sample_category']
---

Then to render this category using link and pages. All we need to do is,

  1. Create a new file with [your_category_name].md inside categories folder.

  2. Copy categories/sample_category.md file and replace the content in [your_category_name].md in that. (Please don’t copy the code below its just sample, since it renders the jekyll syntax dynamically)

---
layout: page
title: Guides
permalink: /blog/categories/your_category_name/
---

<h5> Posts by Category : Adding Multiple Categories in Posts </h5>

<div class="card">

</div>

Using the category, all the posts associated with the category will be listed on http://localhost:4000/blog/categories/your_category_name


About Sujay kundu
Sujay kundu

Full Stack Web Developer, based in Bangalore, India

Email : mail@sujaykundu.com

Website : https://sujaykundu.com

About Corbin Petersen

Having spent over 10 years working in full-time leadership in a large multi-site church, as well as his background in the service and tech industry, Corbin has effectively built and led countless large teams of people that have depended on collaboration and teamwork between multiple departments to succeed. He also has an expertise in managing multiple large projects simultaneously, as well as the ability to absorb complex information and techniques and break them down into teachable segments for training and development of volunteers and coworkers. Corbin is currently pursuing completion of the LaunchCode Web Development bootcamp, growing as a budding full-stack developer. Besides his leadership and technical skills, Corbin is a multi-instrumentalist and songwriter with experience as a professional musician, both on stage and in the studio. All this combined with his thirst for learning, his penchant for mastering new technologies, and his desire to empower and equip others to succeed, Corbin would be a valuable addition to any team and would contribute to its flourishing.

Star
Useful Links