Update titles to be consistent with other sites

This commit is contained in:
Seth Vargo 2014-12-30 13:18:25 -05:00
parent b74af612a9
commit 49d29bc937
3 changed files with 15 additions and 2 deletions

View File

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=0.7, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=0.7, user-scalable=no">
<title>Consul</title> <title>Consul by HashiCorp</title>
<link rel="stylesheet" href="static/bootstrap.min.css"> <link rel="stylesheet" href="static/bootstrap.min.css">
<link rel="stylesheet" href="static/base.css"> <link rel="stylesheet" href="static/base.css">
<link rel="shortcut icon" href="static/favicon.png"> <link rel="shortcut icon" href="static/favicon.png">

View File

@ -31,4 +31,17 @@ helpers do
return "" return ""
end end
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 end

View File

@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><%= current_page.data.page_title ? "#{current_page.data.page_title} - " : "" %>Consul</title> <title><%= title_for(current_page) %></title>
<meta name="description" content="<%= current_page.data.description %>" /> <meta name="description" content="<%= current_page.data.description %>" />
<%= stylesheet_link_tag "application" %> <%= stylesheet_link_tag "application" %>