From ed09558fd71f5e5f12609c8c0b976e07ef8824ce Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 21 Oct 2016 21:38:53 -0700 Subject: [PATCH] Fix website descriptions --- website/config.rb | 9 +++++++++ website/source/layouts/_header.erb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/website/config.rb b/website/config.rb index e9b2dfba3..5ff2e35bb 100644 --- a/website/config.rb +++ b/website/config.rb @@ -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 diff --git a/website/source/layouts/_header.erb b/website/source/layouts/_header.erb index 84d5e9a27..d3a9dec1c 100644 --- a/website/source/layouts/_header.erb +++ b/website/source/layouts/_header.erb @@ -5,7 +5,7 @@ <%= title_for(current_page) %> - + <%= stylesheet_link_tag "application" %>