Removed page content reading meta description. It was pointless. Set a description in your site or page yaml to add a meta description

Conflicts:

	.themes/classic/source/_includes/head.html
This commit is contained in:
Brandon Mathis 2012-05-21 23:47:27 -05:00
parent ca470417e5
commit b07e533d4a
2 changed files with 2 additions and 14 deletions

View File

@ -7,8 +7,8 @@
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
<meta name="author" content="{{ site.author }}">
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}">
{% capture description %}{% if page.description %}{{ page.description }}{% elsif site.description %}{{ site.description }}{% endif %}{% endcapture %}{% if description.length %}
<meta name="description" content="{{ description }}">{% endif %}
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %}
<!-- http://t.co/dKP3o1e -->

View File

@ -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)
/<div class="entry-content">(?<content>[\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(/<!\[CDATA\[/, '&lt;![CDATA[').gsub(/\]\]>/, ']]&gt;')
@ -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 =~ /(.+)\/$|^\/$/