我是Jekyll的新手并且已经安装了Grunt和SASS。我的问题是,当我的测试网站将显示我的新帖子时,当我点击帖子链接时,我收到错误"无法获取/博客/ 示例 - 帖子名称" 。
Grunt在运行Grunt Serve
时没有显示任何错误。但是,如果我运行Jekyll serve
,我会收到以下错误:
Build Warning: Layout 'article' requested in app/_posts/2015-01-31-optimized-jekyll-site-with-grunt.markdown does not exist.
Build Warning: Layout 'article' requested in app/_posts/2017-03-20-welcome-to-jekyll.markdown does not exist.
Liquid Exception: Could not locate the included file 'blog.html' in any of ["/Users/rich/jekyll-site/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site source. in app/index.html
jekyll 3.4.2 | Error: Could not locate the included file 'blog.html' in any of ["/Users/rich/jekyll-site/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site source.
它似乎找不到我的任何内容:_includes,_layouts,ect ...文件夹。
任何帮助将不胜感激。
答案 0 :(得分:0)
尝试在 _includes 文件夹中添加 blog.html 文件,或在帖子layout: default
等中使用2015-01-31-optimized-jekyll-site-with-grunt.markdown
。
答案 1 :(得分:0)
由于您的模板文件位于app/
目录中,因此只需使用app
作为source
目录进行构建。
将以下内容添加到_config.yml
:
source: app
然后像往常一样运行jekyll serve
。