Permalink
Browse files

fix(excerpt-logic): use excerpt if present

Simply override the offending post that contained non-paragraph elements at the beginning...
  • Loading branch information...
1 parent 40732dc commit 9b67246a6e46cc75fb15a96072de07b534f0da28 @dbeg dbeg committed Sep 3, 2015
Showing with 8 additions and 5 deletions.
  1. +1 −0 _posts/2015-09-02-tomcat-slashes.md
  2. +7 −5 index.html
@@ -2,6 +2,7 @@
title: Tomcat Hates Encoded Slashes
author: Ray Nicholus
categories: Tomcat server HTTP REST Java JavaScript
+excerpt: ""
---
## Setup
View
@@ -9,11 +9,13 @@
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h1>
- {% if post.excerpt != blank %}
- <p class="posts-excerpt">{{ post.excerpt }}</p>
- {% else %}
- <p class="posts-excerpt">{{ post.content | strip_html | truncatewords: 50 }}</p>
- {% endif %}
+ <p class="posts-excerpt">
+ {% if post.excerpt != '' %}
+ {{ post.excerpt | truncatewords: 50 | remove: '<p>' | remove: '</p>' }}
+ {% else %}
+ {{ post.content | strip_html | truncatewords: 50 }}
+ {% endif %}
+ </p>
<time>{{ post.date | date: "%b %-d, %Y" }}</time> • {{post.author}}
</li>

0 comments on commit 9b67246

Please sign in to comment.