Skip to content

Commit

Permalink
Add new custom excerpt feature on posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Pinto committed Mar 13, 2020
1 parent 918e0da commit e1c1ea1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ layout: post
title: Your awesome post
date: 2019-08-26 01:00:00 +0100
categories: [jekyll, markdown, documentation]
custom_excerpt: This text will have precedence as an excerpt over the usual and default first paragraph of text.
---
```
Expand Down
4 changes: 4 additions & 0 deletions _includes/_article-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ <h3 class="article-list__heading">
>{{ post.title }}</a
>
</h3>
{% if post.custom_excerpt %}
<p class="article-list__excerpt">{{ post.custom_excerpt | strip_html }}</p>
{% else %}
<p class="article-list__excerpt">{{ post.excerpt | strip_html }}</p>
{% endif %}
</li>
{% endfor %}
</ol>
2 changes: 1 addition & 1 deletion _posts/2019-08-26-markdown-parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: post
title: Markdown parsing
date: 2019-08-26 01:00:00 +0100
categories: [jekyll, markdown, documentation]

custom_excerpt: In this blog post, you'll learn how to use markdown in your favour. Get to know how markdown is being parsed and how you can style your posts the best way.
---

Here's an overview of what you can expect to do with kramdown, the markdown parser used in Mero.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jekyll-mero",
"version": "1.2.1",
"version": "1.3.0",
"description": "A light-weight and minimal theme for Jekyll.",
"private": true,
"scripts": {
Expand Down

0 comments on commit e1c1ea1

Please sign in to comment.