Skip to content

Commit 574746b

Browse files
committed
Push javascript to the bottom, read description
1 parent e6feb90 commit 574746b

2 files changed

Lines changed: 23 additions & 27 deletions

File tree

website/source/layouts/_footer.erb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222
</div>
2323
</div>
2424

25+
<script>
26+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
27+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
28+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
29+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
30+
31+
ga('create', 'UA-53231375-1', 'auto');
32+
ga('send', 'pageview');
33+
</script>
34+
2535
<%= javascript_include_tag "application" %>
2636

2737
</body>

website/source/layouts/_meta.erb

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,21 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<meta name="description" content="">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="description" content="<%= current_page.data.description %>">
77

8-
<link rel="shortcut icon" href="<%= image_path('favicon.png') %>">
8+
<link rel="shortcut icon" href="<%= image_path('favicon.png') %>">
99

10-
<title><%= current_page.data.page_title ? "#{current_page.data.page_title} - " : "" %>Terraform</title>
10+
<title><%= [current_page.data.page_title, "Terraform by HashiCorp"].compact.join(" - ") %></title>
1111

12-
<!-- Bootstrap core CSS -->
13-
<%= stylesheet_link_tag "application" %>
12+
<%= stylesheet_link_tag "application" %>
1413

15-
<!-- google fonts -->
16-
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'>
14+
<!--[if lt IE 9]>
15+
<%= javascript_include_tag "html5shiv", "respond.min" %>
16+
<![endif]-->
1717

18-
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
19-
<!--[if lt IE 9]>
20-
<%= javascript_include_tag "html5shiv", "respond.min" %>
21-
<![endif]-->
18+
<%= yield_content :head %>
19+
</head>
2220

23-
<%= yield_content :head %>
24-
25-
<script>
26-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
27-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
28-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
29-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
30-
31-
ga('create', 'UA-53231375-1', 'auto');
32-
ga('send', 'pageview');
33-
</script>
34-
</head>
35-
<body id="page-<%= current_page.data.page_title ? "#{current_page.data.page_title}" : "home" %>" class="page-<%= current_page.data.page_title ? "#{current_page.data.page_title} layout-#{current_page.data.layout} page-sub" : "home layout-#{current_page.data.layout}" %>">
21+
<body id="page-<%= current_page.data.page_title ? "#{current_page.data.page_title}" : "home" %>" class="page-<%= current_page.data.page_title ? "#{current_page.data.page_title} layout-#{current_page.data.layout} page-sub" : "home layout-#{current_page.data.layout}" %>">

0 commit comments

Comments
 (0)