Multiple Blogs on One Site1
Suppose that you have two categories of blogs. There are two ways to create directories in your website folder
The first approach will automatically assign categories to your posts.
Using the second approach, you will need to manually add category: your_blog_folder_name
to Yaml Front Matter
in each post.
You also need to modify the default layout template for the category blog1
by adding a filter using post.categories contains 'category name'
to where it is appropriate. For example,
See Jekyll help document on Posts for more information on how to modify a template
Updated on 3/14/2020.
-
I learned this trick mainly from the post Create a Multi Blog Site with Jekyll written by Guillermo Garron. ↩︎