Remove quotes from meta descriptions

SEO stops at that quote, so many of our pages have a description of
"the".
This commit is contained in:
Seth Vargo 2017-03-20 01:35:16 -04:00
parent 166e0b4ef4
commit 3a4e14cfe6
No known key found for this signature in database
GPG Key ID: C921994F9C27E0FF
1 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,11 @@ helpers do
#
# @return [String]
def description_for(page)
return escape_html((page.data.description || "").gsub(/\n+/, ' ').squeeze(' '))
description = (page.data.description || "")
.gsub('"', '')
.gsub("/\n+/", ' ')
.squeeze(' ')
return escape_html(description)
end
# This helps by setting the "active" class for sidebar nav elements