Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
259 views
in Technique[技术] by (71.8m points)

html - Jekyll default installation doesn't have _layouts directory

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...