mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-24 08:28:50 -05:00
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:
parent
ca470417e5
commit
b07e533d4a
@ -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 -->
|
||||
|
@ -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\[/, '<![CDATA[').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 =~ /(.+)\/$|^\/$/
|
||||
|
Loading…
Reference in New Issue
Block a user