mirror of
https://github.com/WatchOutNewsAgency/wona.github.com.git
synced 2026-01-01 01:16:26 +00:00
Adds first 150 chars of content as meta description, if no page.description specified. Fixes #162
This commit is contained in:
@ -56,6 +56,13 @@ module OctopressLiquidFilters
|
||||
end
|
||||
end
|
||||
|
||||
# Extracts raw content DIV from template, used for page description as {{ content }}
|
||||
# contains complete sub-template code on main page level
|
||||
def raw_content(input)
|
||||
/.<div class="entry-content">(?<content>[\s\S]*?)<\/div>\s*<\/article>/ =~ input
|
||||
return (content.nil?) ? input : content
|
||||
end
|
||||
|
||||
# Replaces relative urls with full urls
|
||||
def expand_urls(input, url='')
|
||||
url ||= '/'
|
||||
|
||||
Reference in New Issue
Block a user