简体   繁体   English

如何在新的Jekyll站点中修复丢失的目录

[英]How to fix missing directories in a new Jekyll site

I finally got all my Ruby issues squared away and have Jekyll installed. 我终于把所有的Ruby问题都解决了,并安装了Jekyll。 When I run jekyll new sitename it creates a new Jekyll project and doesn't show any errors, but the project is missing several directories including _includes , _layouts , _sass . 当我运行jekyll new sitename创建一个新项目杰基尔并没有显示任何错误,但该项目缺少几个目录,包括_includes_layouts_sass

When I browse to the site on my localhost, however, it shows a working site. 但是,当我浏览本地主机上的站点时,它会显示一个工作站点。 The _site folder has a CSS file in the assets folder. _site文件夹在_site文件夹中有一个CSS文件。

Every tutorial I've seen shows that those missing directories I list above should be created when the project is initialized, but this is my first time working with Jekyll, so I can't tell if I'm missing something. 我看到的每个教程都显示我在上面列出的那些缺少的目录应该在项目初始化时创建,但这是我第一次使用Jekyll,所以我不知道我是否遗漏了一些东西。

Does anyone know what would cause the site to be incomplete or for these directories to be hidden? 有谁知道什么会导致网站不完整或隐藏这些目录?

Jekyll 3.2.0 introduced gem based themes : Jekyll 3.2.0引入了基于宝石的主题

Our flagship feature for this release has been themes. 我们在此版本中的旗舰功能一直是主题。 Themes?!, you say? 主题?!,你说? Yes, proper, versionable, releasable, first-class themes. 是的,正确的,可版本化的,可释放的,一流的主题。 We're pretty stoked about it and we hope you like building and using them. 我们对此非常感兴趣,我们希望您喜欢构建和使用它们。 For now, it only supports layouts, includes, and sass, but we have plans to include static assets like images and CSS/JS in a future release. 目前,它只支持布局,包含和sass,但我们计划在将来的版本中包含静态资产,如图像和CSS / JS。

That basically means that by default you won't have these typical directories: 这基本上意味着默认情况下你不会有这些典型的目录:

/assets
/_layouts
/_includes
/_sass

But you can always overwrite them or copy to your jekyll instance to modify them . 但是你总是可以覆盖它们或复制到你的jekyll实例来修改它们

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM