所以我按照Jekyll网站上的指南安装和运行Jekyll(确定我不必在这里发布).并且网站运行正常,但出于某种原因,我没有看到_layouts应该存在的目录.在页面中,我可以看到它引用了一些布局,即:
的index.html
---
layout: default
---
<div class="home">
Run Code Online (Sandbox Code Playgroud)
about.md
---
layout: page
title: About
permalink: /about/
---
This is the base Jekyll theme.
Run Code Online (Sandbox Code Playgroud)
但是当你查看项目的目录结构时:
没有布局文件夹..那是什么?一切都有效.在localhost上运行时看起来非常好.
Ros*_*oss 28
您必须运行最近的Jekyll版本3.2,它引入了基于Gem的主题(来自https://jekyllrb.com/docs/themes/):
Jekyll主题包的布局,包含和样式表的方式可以被您网站的内容覆盖.
主题在_config.yml中设置:
theme: minima
Run Code Online (Sandbox Code Playgroud)
以前在_layouts,_includes和_sass现在与主题一起打包的初始文件.
Jer*_*nch 10
基本上杰基尔要你使用的主题,所以你看不到_layouts,_includes,_sass,_assets了.
要使用以前的行为,只需从gemfile中复制:
open $(bundle show minima)
Run Code Online (Sandbox Code Playgroud)
将4个文件夹复制到jekyll目录中