Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jekyll shows no content

Tags:

ruby

jekyll

I'm developing a blog using Jekyll. When I run the server with command jekyll the content don't generate.

Below what appears in the terminal:

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

index.html

I used the default Jekyll boilerplate.

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

Standard also.

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 Standard also.

<!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>
like image 747
fernahh Avatar asked Jan 13 '13 14:01

fernahh


1 Answers

I have created an example gist using the three files. I ran jekyll serve using Jekyll 2.1.1 (jekyll --server has been deprecated and replaced with this command), and I did not get any errors (though Jekyll did ignore the liquid syntax because of the yaml front matter).

I have a feeling that this problem was related to a bug in WEBrick (Jekyll's default server).

I am aware that the YAML front matter is missing --- around it and I don't have the _posts directory, though I am assuming that this issue was unrelated.

like image 183
Nick McCurdy Avatar answered Nov 19 '22 21:11

Nick McCurdy