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:
- In _config.yml, add this line:
Then, create a directory called
_pagesat the top level of your project.
- Add pages to the
_pagesdirectory. 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.