From 36052d8c2e19ae162e380e556a45cbf9fe3eb0ca Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Wed, 22 Jul 2015 19:28:35 -0700 Subject: [PATCH] Add new layout with magic footer link and static google analytics partial --- website/source/layouts/layout.erb | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/website/source/layouts/layout.erb b/website/source/layouts/layout.erb index 420883de6..a5cc83c5b 100644 --- a/website/source/layouts/layout.erb +++ b/website/source/layouts/layout.erb @@ -52,9 +52,16 @@
  • A HashiCorp project.
  • -
  • - Edit this page -
  • + <% # current_page.path does not have an extension, but + # current_page.source_file does. Also, we don't want to show + # this on the homepage. + if current_page.url != "/" + current_page_source = current_page.path + \ + current_page.source_file.split(current_page.path)[1] %> +
  • + Edit this page +
  • + <% end %> @@ -63,21 +70,6 @@ - + <%= partial "layouts/google-analytics.html" %>