I'm currently building my new personal website and I'm trying out Jekyll, now I was wondering what the best way is to get multiple post types. I basically want to have 2 categories: blog and work
I was looking up some ways and one way was to just create folders for each specific category
- work
-- _posts
--- portfolio01.md
--- portfolio02.md
- blog
-- _posts
--- blogitem01.md
--- blogitem02.md
This way seems to work just fine.
After checking if this was the correct solution I found another one, this basically suggested to use subfolders inside the _posts
folder and then define a category in the post itself.
- _posts
-- blog
--- blogitem01.md
--- blogitem02.md
-- work
--- portfolio01.md
--- portfolio02.md
Both methods seem to have the exact same output, is there any real difference in this? Method one seems to be easier as you don't have to set a specific category inside each post.
They are both the same. They are both perfectly valid.
- work
-- _posts
--- portfolio01.md
--- portfolio02.md
- blog
-- _posts
--- blogitem01.md
--- blogitem02.md
This approach will automatically assign categories to your posts. The portfolio01.md
and portfolio02.md
posts will automatically be assigned the work
category. The blogitem01.md
and blogitem02.md
will automatically be assigned the blog
category.
- _posts
-- blog
--- blogitem01.md
--- blogitem02.md
-- work
--- portfolio01.md
--- portfolio02.md
This approach will not automatically assign categories to any of your posts. You can specify the categories manually in the Front Matter of each post.
If you aren't using categories, then both approaches do the same thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With