now only excerpted articles show the "read on" link. Also the text for that link can be set in the _config.yml

This commit is contained in:
Brandon Mathis 2011-08-20 16:02:37 -04:00
parent 178a198ea7
commit 596ec87c37
3 changed files with 12 additions and 3 deletions

View file

@ -12,6 +12,11 @@ module OctopressFilters
end
end
# Checks for excerpts (helpful for template conditionals)
def has_excerpt(input)
input =~ /<!--\s*more\s*-->/i ? true : false
end
# Summary is used on the Archive pages to return the first block of content from a post.
def summary(input)
if input.index(/\n\n/)