杰基尔没有显示任何内容

fer*_*ahh 6 ruby jekyll

我正在使用Jekyll开发一个博客.当我使用命令运行服务器时jekyll,内容不会生成.

在终端出现的内容之下:

WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true

的index.html

我使用了默认的Jekyll样板.

layout: default

{% for post in paginator.posts %}
<article>

  <header class="entry-header">
    <h2 class="entry-title"><a href="{{ post.url }}" title="{{ post.title }}" rel="bookmark">{{ post.title }}</a></h2>
  </header>

  <aside class="entry-details">
    <p class="entry-date">Publicado em: <a href="{{ post.url }}">{{ post.date | date: "%d/%m/%y" }}</a></p>
  </aside>

  <div class="entry-content">
      {{ post.content }}
  </div>

</article>
{% endfor %}
Run Code Online (Sandbox Code Playgroud)

post.html

标准也.

layout: default

<article>

  <header class="entry-header">
    <h2 class="entry-title"><a href="{{ page.url }}" title="{{ page.title }}" rel="bookmark">{{ page.title }}</a></h2>
  </header>

  <aside class="entry-details">
    <a href="{{ page.url }}" class="entry-date">{{ page.date | date: "%d/%m/%y" }}</a>
  </aside>

  <div class="entry-content clearfix">
    {{ post.content }}
  </div>

  <footer class="entry-meta">
    {% include disqus.html %}
  </footer>

</article>
Run Code Online (Sandbox Code Playgroud)

default.html标准也.

<!doctype html>
<html lang="pt-BR">
<head>
  {% include head.html %}
</head>

<body class="home blog">

  {% include header.html %}

  <div id="content">
    {{ content }}
  </div><!-- end #content -->

  {% include footer.html %}

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

Nic*_*rdy 1

我使用这三个文件创建了一个示例要点。jekyll serve使用 Jekyll 2.1.1 运行(jekyll --server已弃用并替换为此命令),并且没有收到任何错误(尽管 Jekyll 确实由于 yaml 前面的问题而忽略了 Liquid 语法)。

我感觉这个问题与WEBrick(Jekyll 的默认服务器)中的一个错误有关。

我知道 YAML 前面的内容丢失了---,而且我没有该_posts目录,尽管我假设这个问题无关。