Fix website descriptions

This commit is contained in:
Seth Vargo 2016-10-21 21:38:53 -07:00
parent 9d95eb821c
commit ed09558fd7
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
2 changed files with 10 additions and 1 deletions

View File

@ -56,4 +56,13 @@ helpers do
"Vagrant by HashiCorp"
end
# Get the description for the page
#
# @param [Middleman::Page] page
#
# @return [String]
def description_for(page)
return escape_html(current_page.data.description || "")
end
end

View File

@ -5,7 +5,7 @@
<meta charset="utf-8">
<title><%= title_for(current_page) %></title>
<meta name="description" content="<%= current_page.data.description %>" />
<meta name="description" content="<%= description_for(current_page) %>" />
<%= stylesheet_link_tag "application" %>