diff --git a/_config.yml b/_config.yml index 8dc616f..534daac 100644 --- a/_config.yml +++ b/_config.yml @@ -81,6 +81,8 @@ share-links-active: url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" # --- Misc --- # +# Manually break the site excerpt +excerpt_separator: # Fill in your Disqus shortname (NOT the userid) if you want to support Disqus comments #disqus: "" diff --git a/index.html b/index.html index 463143b..5f93984 100644 --- a/index.html +++ b/index.html @@ -22,8 +22,19 @@ subtitle: This is where I will tell my friends way too much about me

- {{ post.excerpt | strip_html | xml_escape | truncatewords: 50 }} - [Read More] + {% if post.content contains site.excerpt_separator %} + {{ post.excerpt | strip_html | xml_escape }} + [Read More] + {% else %} + {% assign cleaned_content = post.content | strip_html | xml_escape %} + {% assign truncated_content = cleaned_content | truncatewords: 50 %} + {% if truncated_content == cleaned_content %} + {{ cleaned_content }} + {% else %} + {{ truncated_content }} + [Read More] + {% endif%} + {% endif %}
{% if post.tags.size > 0 %}