From a696d6445802e27cb3bc6e02ef0ada4c65736c66 Mon Sep 17 00:00:00 2001 From: Sherri Mitchell Date: Sun, 4 Sep 2016 21:50:32 -0400 Subject: [PATCH 1/3] added open graph meta data to conference#show --- app/views/conference/show.html.haml | 10 +++++++++- app/views/layouts/application.html.haml | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index 90a9b4eb..f3b0cfe2 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -1,8 +1,16 @@ +- content_for :head do + %meta{ :property => 'og:title', :content => '#{@conference.title}' } + %meta{ :property => 'og:image', :content => '(@conference.picture_url)' } + %meta{ :property => 'og:url', :content => '(@conference.short_title)' } + %meta{ :property => 'og:description', :content => '(@conference.description)'} + %meta{ :property => 'og:site_name', :content => (ENV['OSEM_NAME'] || 'OSEM') } + - end + = content_for :title do = @conference.title #splash - - if @conference.splashpage + - if @conference.splashpage} #banner .container .row diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 893198fa..355edc46 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -5,6 +5,7 @@ %title= content_for?(:title) ? yield(:title) : (ENV['OSEM_NAME'] || 'OSEM') %meta{:content => "", :name => "description"} %meta{:content => "", :name => "author"} + %meta= content_for?(:head) ? yield(:head) : ('') = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application" From 5cdf397b2f54a3982099d8815f16bd80558f87b8 Mon Sep 17 00:00:00 2001 From: Sherri Mitchell Date: Fri, 9 Sep 2016 09:32:07 -0400 Subject: [PATCH 2/3] Updated metatag code in conference#show. --- app/views/conference/show.html.haml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index f3b0cfe2..9ec9781f 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -1,16 +1,15 @@ - content_for :head do - %meta{ :property => 'og:title', :content => '#{@conference.title}' } - %meta{ :property => 'og:image', :content => '(@conference.picture_url)' } - %meta{ :property => 'og:url', :content => '(@conference.short_title)' } - %meta{ :property => 'og:description', :content => '(@conference.description)'} + %meta{ :property => 'og:title', :content => @conference.title } + %meta{ :property => 'og:image', :content => @conference.picture_url } + %meta{ :property => 'og:url', :content => conference_path(@conference.short_title) } + %meta{ :property => 'og:description', :content => @conference.description} %meta{ :property => 'og:site_name', :content => (ENV['OSEM_NAME'] || 'OSEM') } - - end = content_for :title do = @conference.title #splash - - if @conference.splashpage} + - if @conference.splashpage #banner .container .row From b1f4d7c66e79538e25c0940a686886c9163f0a11 Mon Sep 17 00:00:00 2001 From: Sherri Mitchell Date: Thu, 15 Sep 2016 20:42:00 -0400 Subject: [PATCH 3/3] Fixes an issue with canonical urls for sharing conference#show with Facebook and other social media sites --- app/views/conference/show.html.haml | 11 ++++++----- app/views/layouts/application.html.haml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index 9ec9781f..8f7878cb 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -1,9 +1,10 @@ - content_for :head do - %meta{ :property => 'og:title', :content => @conference.title } - %meta{ :property => 'og:image', :content => @conference.picture_url } - %meta{ :property => 'og:url', :content => conference_path(@conference.short_title) } - %meta{ :property => 'og:description', :content => @conference.description} - %meta{ :property => 'og:site_name', :content => (ENV['OSEM_NAME'] || 'OSEM') } + %meta{ :property => "og:title", :content => @conference.title } + %meta{ :property => "og:site_name", :content => (ENV['OSEM_NAME'] || 'OSEM') } + - @conference[:picture] + %meta{property: "og:image:secure_url", content: @conference.picture_url} + %meta{ :property => "og:description", :content => @conference.description } + %meta{ :property => "og:url", :content => @conference.short_title } = content_for :title do = @conference.title diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 355edc46..7f8ca0b7 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -5,7 +5,7 @@ %title= content_for?(:title) ? yield(:title) : (ENV['OSEM_NAME'] || 'OSEM') %meta{:content => "", :name => "description"} %meta{:content => "", :name => "author"} - %meta= content_for?(:head) ? yield(:head) : ('') + = content_for?(:head) ? yield(:head) : ('') = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application"