ConstraintErrors
ConstraintErrors

Reputation: 133

Jekyll: Display all posts in the same page

I have been reading everything at Jekyll Docs, but I couldn't find a way to do this.

By default when generating a web, jekyll displays a list of the links of all your blog posts. Is there a way to display the content of all your blog posts in the same page? (alla blogspot/wordpress/traditional blog...)

Upvotes: 7

Views: 6998

Answers (1)

ConstraintErrors
ConstraintErrors

Reputation: 133

Found my solution from: This tutorial, which consists of editing index.md and adding the following:

  {% for post in site.posts %}
  <article>
    <h2>
      <a href="{{ post.url }}">
        {{ post.title }}
      </a>
    </h2>
    <time datetime="{{ post.date | date: "%Y-%m-%d" }}">{{ post.date | date_to_long_string }}</time>
    {{ post.content }}
  </article>
{% endfor %}

Upvotes: 4

Related Questions