From b785a87869e0ea654b2ee1a91d562660f56f8783 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 21 May 2012 23:47:27 -0500 Subject: [PATCH] Removed page content reading meta description. It was pointless. Set a description in your site or page yaml to add a meta description --- .themes/classic/source/_includes/head.html | 4 ++-- plugins/octopress_filters.rb | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index 7d89d97..c5cd2d9 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -7,8 +7,8 @@ {% if page.title %}{{ page.title }} - {% endif %}{{ site.title }} - {% capture description %}{% if page.description %}{{ page.description }}{% elsif site.description %}{{ site.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} - + {% capture description %}{% if page.description %}{{ page.description }}{% elsif site.description %}{{ site.description }}{% endif %}{% endcapture %}{% if description.length %} + {% endif %} {% if page.keywords %}{% endif %} diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index 4fc3d6e..abadf9d 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -63,13 +63,6 @@ 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) - /
(?[\s\S]*?)<\/div>\s*<(footer|\/article)>/ =~ input - return (content.nil?) ? input : content - end - # Escapes CDATA sections in post content def cdata_escape(input) input.gsub(//, ']]>') @@ -116,11 +109,6 @@ module OctopressLiquidFilters end end - # Condenses multiple spaces and tabs into a single space - def condense_spaces(input) - input.gsub(/\s{2,}/, ' ') - end - # Removes trailing forward slash from a string for easily appending url segments def strip_slash(input) if input =~ /(.+)\/$|^\/$/