2
votes

I have a _posts folder that contains all my posts for my blog and projects. I'd like to separate the markdown files for my blog notes and project pages. For example, in addition to the built-in md -> HTML conversion for files in _posts, I'd like to have a _projects folder that contain my markdown files for individual project write-ups and build them into HTML when running jekyll serve.

3

3 Answers

6
votes

just define a collections key in your _config.yml:

collections:
  projects:
    output: true

Official docs for more info..

2
votes

Looks like you want to use categories. Here is a link discussing a similar problem : Multiple _posts directories

2
votes

By default Jekyll will ignore new folders with an underscore prefix, so you can't use _projects.

You can separate _posts in several folders, to have all your project files in a specific folder, create projects/_posts folder structure and move your project files inside projects/_posts, leaving blog posts in _posts.

Jekyll will generate each post and automatically assign the project category to them, so you can also generate different lists from your blog posts.