Skip to content

Commit

Permalink
Merge pull request #514 from ZeusWPI/feature/453/facebook-metadata
Browse files Browse the repository at this point in the history
Add facebook metadata #453
  • Loading branch information
TomNaessens committed Jul 12, 2015
2 parents c6665e5 + c05cc56 commit ffd0759
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/views/events/_tabs.html.erb
@@ -1,4 +1,7 @@
<% content_for :title_tag, " - #{@event.name}" %>
<% content_for :og_title, @event.name %>
<% content_for :og_url, event_path(@event) %>
<% content_for :og_description, @event.description %>

<h1><%= @event.name %>
<%= link_to raw('<i class="glyphicon glyphicon-calendar"></i>'), event_path(@event, format: :ics), {class: "btn btn-xs"} %>
Expand Down
10 changes: 10 additions & 0 deletions app/views/layouts/application.html.erb
Expand Up @@ -9,6 +9,16 @@
<%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %>
<%= render partial: "layouts/ga" if Rails.env.production? %>
<%= csrf_meta_tags %>
<% if content_for?(:og_title) %>
<meta property="og:title" content="<%= yield(:og_title) %>" />
<% end %>
<% if content_for?(:og_url) %>
<meta property="og:url" content="<%= yield(:og_url) %>" />
<% end %>
<% if content_for?(:og_description) %>
<meta property="og:description" content="<%= yield(:og_description) %>" />
<% end %>
</head>

<body>
Expand Down

0 comments on commit ffd0759

Please sign in to comment.