Date posted: 29 Dec 2017, 0 minutes to read

Using excerpts in Jekyll

I wanted to include at least some more information in the index page of my blog instead of just the publish date and title, so I searched around for some help to include an excerpt in Jekyll and found some help on this blog.

The solution was very straightforward, but I’ll include it here for future reference.

Index page

In the index page, you can search the content of a post, check for specific tags and use the text between them:

<!-- index.html -->
<p class="post-excerpt">



Note: if the specified tags aren’t found in the content, the first 20 words will be used.


In a post, you can now include the excerpt tags to add a specific excerpt:

<!-- _posts/some-random-post.html -->
Here's all my content, and <!--excerpt.start-->here's where I want my summary to begin, and this is where I want it to end<!--excerpt.end-->.