Skip to content

Commit

Permalink
Also update og:description per the matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlory committed Nov 24, 2017
1 parent 665c4a7 commit 122ddf4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pegasus/sites.v3/code.org/public/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
<%
hoc = DCDO.get('soon-hoc', false) || DCDO.get('actual-hoc', false)
share_image = hoc ? 'celeb-challenge.jpg' : 'default-og-image.jpg'
description = hoc ? I18n.t(:og_description_celeb) : I18n.t(:og_description)
%>
theme: responsive_wide
banner: null
layout: wide
video_player: true
social:
"og:title": "<%= I18n.t(:og_title) %>"
"og:description": "<%= I18n.t(:og_description)%>"
"og:description": "<%= description %>"
"og:image" : "<%= 'https://' + request.host + '/images/fit-1220/social-media/' + share_image %>"
"og:image:width": '1220'
"og:image:height": '640'
Expand All @@ -18,7 +19,7 @@ social:
"twitter:site": "@codeorg"
"twitter:url": "https://code.org/"
"twitter:title": "<%= I18n.t(:og_title) %>"
"twitter:description": "<%= I18n.t(:og_description)%>"
"twitter:description": "<%= description %>"
critical_font: true
jquery: defer
style_min: true
Expand Down
9 changes: 7 additions & 2 deletions pegasus/sites.v3/csedweek.org/public/index.haml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
<%
description = I18n.t(:csedweek_og_description)
description = I18n.t(:csedweek_og_description_soon) if DCDO.get('soon-hoc', false)
description = I18n.t(:csedweek_og_description_here) if DCDO.get('actual-hoc', false)
%>
theme: responsive
banner: null
social:
"og:title": "<%= I18n.t(:csedweek_og_title) %>"
"og:description": "<%= I18n.t(:csedweek_og_description)%>"
"og:description": "<%= description %>"
"og:image": "https://<%=request.host%>/images/cs-is-everything-thumbnail.png"
"og:image:width": "1200"
"og:image:height": "627"
Expand All @@ -16,7 +21,7 @@ social:
"twitter:site": "@codeorg"
"twitter:url": "https://csedweek.org/"
"twitter:title": "<%= I18n.t(:csedweek_og_title) %>"
"twitter:description": "<%= I18n.t(:csedweek_og_description)%>"
"twitter:description": "<%= description %>"
"twitter:image:src": "https://<%=request.host%>/images/cs-is-everything-thumbnail.png"
"twitter:player": "https://youtube.com/embed/QvyTEx1wyOY"
"twitter:player:width": "640"
Expand Down

0 comments on commit 122ddf4

Please sign in to comment.