Skip to content

Commit

Permalink
Improve Facebook title and button
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolai-b committed Aug 16, 2016
1 parent 7906b39 commit ef38547
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def tweet_button(text:, link:, size: nil, via: 'cyclescape')
data: { text: text, link: link, size: size, via: via}
end

def facebook_like(link, layout: 'button_count')
def facebook_like(link, layout: 'button')
tag(:div, class: "fb-share-button",
data: { href: link, layout: layout} )
end
Expand Down
3 changes: 2 additions & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
%meta{name: "description", content: page_description}
%meta{property: "og:description", content: page_description}
- if page_title
%meta{property: "og:title", content: page_title}
%meta{property: "og:title", content: page_title.gsub(" - #{t('application_name')}", "")}
%meta{property: "og:site_name", content: t('application_name')}

%body{class: [Rails.env, controller_path.tr("/_", "-")].join(" ")}
#fb-root
Expand Down

0 comments on commit ef38547

Please sign in to comment.