diff options
Diffstat (limited to '')
-rw-r--r-- | plugins/octopress_filters.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index 1a959892..bade7e49 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -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 ||= '/' |