我无法让 jekyll 将 _posts 目录中的帖子转换为 html。它会正确生成 index.md,但不会为帖子生成任何内容。当我添加 'source: _posts' 时,它会转换帖子,但不会转换 index.md。
据我所知,'source' 应该不添加到 _config.yml 中以指向 '.'
我的目录结构很标准:
$ find .|fgrep -v bootstrap . ./index.md ./_config.yml ./_drafts ./_includes ./_includes/footer.html ./_includes/header.html ./_layouts ./_layouts/default.html ./_posts ./_posts/2013--02-25-test-blog.md ./_site ./_site/index.html
$ cat _config.yml name: "Developer blog" description: "" url: "http://localhost:4000" source: . paginate: 10 markdown: rdiscount permalink: pretty pygments: true auto: true
即使我关闭自动,也看不到任何堆栈痕迹。
$ cat _posts/2013--02-25-test-blog.md --- layout: default title: Testing a blog --- #test blog this is a test
最佳答案
_posts/2013--02-25-test-blog.md
这个名字不正确。
也许用这个
_posts/2013-02-25-test-blog.md
请仔细注意年份后只有一个连字符。
关于ruby - jekyll 不生成_posts,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15046420/