How to make a Jekyll _pages directory

Jekyll is such a clean, lightweight site generator, but it can be hard to keep your project organized if your site uses a lot of pages. Luckily, you can use this Github-Pages-friendly method to create a dedicated _pages directory inside your project, keeping your root directory clear of disorganized bloat. It’s very simple to add this functionality:

  1. In _config.yml, add this line:
      include: ['_pages']
  2. Then, create a directory called _pages at the top level of your project.

  3. Add pages to the _pages directory. And give them frontmatter, like this:
title:     My Awesome Page
permalink: /awesome
layout:    page

You may need to change the frontmatter layout property to match your desired layout.