ruby - jekyll 不生成_posts

标签 ruby jekyll rdiscount

我无法让 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/

相关文章:

ruby - 在 Ruby 中调用 Yield 时出现 Stack Level Too Deep 错误

image - 如何在带有 Jekyll-seo-tag 的帖子上为 Twitter 卡片添加图像?

ruby - Liquid 模板 - 按名称访问成员

ruby - sass/scss 完整站点模板

ruby - 使用 ruby​​ 创建符号链接(symbolic link)

ruby-on-rails - Rails 3 中的 rdiscount + haml 问题

rubygems - 缺少依赖项: rdiscount

ruby-on-rails - 在方法之间传递数据时的正确技术

ruby - Jekyll 未生成 _sites 文件夹