From 49d29bc9370e5bed336e296376d7a60067b0868a Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Tue, 30 Dec 2014 13:18:25 -0500 Subject: [PATCH] Update titles to be consistent with other sites --- ui/index.html | 2 +- website/config.rb | 13 +++++++++++++ website/source/layouts/_header.erb | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/index.html b/ui/index.html index 2200e992dd..ba9e9e02ea 100644 --- a/ui/index.html +++ b/ui/index.html @@ -4,7 +4,7 @@ - Consul + Consul by HashiCorp diff --git a/website/config.rb b/website/config.rb index 5bb6a8574e..a12948017c 100644 --- a/website/config.rb +++ b/website/config.rb @@ -31,4 +31,17 @@ helpers do return "" end end + + # Get the title for the page. + # + # @param [Middleman::Page] page + # + # @return [String] + def title_for(page) + if page && page.data.page_title + return "#{page.data.page_title} - Consul by HashiCorp" + end + + "Consul by HashiCorp" + end end diff --git a/website/source/layouts/_header.erb b/website/source/layouts/_header.erb index c364b42555..1f480dd019 100644 --- a/website/source/layouts/_header.erb +++ b/website/source/layouts/_header.erb @@ -4,7 +4,7 @@ - <%= current_page.data.page_title ? "#{current_page.data.page_title} - " : "" %>Consul + <%= title_for(current_page) %> <%= stylesheet_link_tag "application" %>