【发布时间】:2013-01-13 14:41:34
【问题描述】:
我正在使用 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 %}
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>
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>
【问题讨论】:
-
不是正在生成
_sites目录吗?你想使用什么命令,jekyll --server? -
嗯,目录没有生成
_site。当我对 HTML 进行更改时,它们不会生成。是的,我正在使用jekyll --server。 -
试试
jekyll build,会生成_site文件夹吗?