37
votes

So I followed the guide on the Jekyll website by installing and running Jekyll (sure I don't have to post this here). And the site is up and running perfectly but for some reason I don't see the _layouts directory that's supposed to be there. In the pages I can see that it references some layouts i.e:

index.html

---
layout: default
---

<div class="home">

about.md

---
layout: page
title: About
permalink: /about/
---

This is the base Jekyll theme.

But when you look at the directory stucture of the project:

enter image description here

No layouts folder.. what's up with that? Everything works though. And it looks perfectly fine when run on localhost.

3

3 Answers

31
votes

You must be running the recent Jekyll version 3.2, which introduces Gem based themes (from https://jekyllrb.com/docs/themes/):

Jekyll themes package layouts, includes, and stylesheets in a way that can be overridden by your site’s content.

The theme is set in _config.yml:

theme: minima

Initial files that were previously in _layouts, _includes, and _sass are now packaged with the theme.

12
votes

Basically Jekyll wants you to use themes, so you can't see _layouts, _includes, _sass, _assets anymore.

To use previous behaviour simply copy from the gemfile:

open $(bundle show minima)

Copy the 4 folders into your jekyll directory

2
votes

If you want the older style of Jekyll website directory which includes all the 4 folders then you can use this command : jekyll new my-new-website-name --blank I have done the same while creating a personal site.