-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update code.org og tags to match the marketing matrix #19398
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
--- | ||
<% | ||
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) | ||
|
||
title = I18n.t(:og_title) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will these strings require a content scoop? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
title = I18n.t(:og_title_soon) if DCDO.get('soon-hoc', false) | ||
title = I18n.t(:og_title_here) if DCDO.get('actual-hoc', false) | ||
%> | ||
theme: responsive_wide | ||
banner: null | ||
layout: wide | ||
video_player: true | ||
social: | ||
"og:title": "<%= I18n.t(:og_title) %>" | ||
"og:description": "<%= I18n.t(:og_description)%>" | ||
"og:title": "<%= title %>" | ||
"og:description": "<%= description %>" | ||
"og:image" : "<%= 'https://' + request.host + '/images/fit-1220/social-media/' + share_image %>" | ||
"og:image:width": '1220' | ||
"og:image:height": '640' | ||
"twitter:image:src" : "<%= 'https://' + request.host + '/images/fit-1220/social-media/' + share_image %>" | ||
"twitter:card": player | ||
"twitter:site": "@codeorg" | ||
"twitter:url": "https://code.org/" | ||
"twitter:title": "<%= I18n.t(:og_title) %>" | ||
"twitter:description": "<%= I18n.t(:og_description)%>" | ||
"twitter:title": "<%= title %>" | ||
"twitter:description": "<%= description %>" | ||
critical_font: true | ||
jquery: defer | ||
style_min: true | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
--- | ||
<% | ||
title = hoc_s(:meta_tag_og_title) | ||
title = I18n.t(:og_title_soon) if DCDO.get('soon-hoc', false) | ||
title = I18n.t(:og_title_here) if DCDO.get('actual-hoc', false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it ok to mix & match There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that it's fine - as far as I know. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now I'm wondering whether it's necessary to use it on pages that are exclusively on hourofcode.com. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tanyaparker tells me that |
||
%> | ||
layout: wide_index | ||
title: "<%= hoc_s(:front_title).gsub(/%{campaign_date}/, campaign_date('full-year')) %>" | ||
social: | ||
"og:title": "<%= hoc_s(:meta_tag_og_title) %>" | ||
"og:title": "<%= title %>" | ||
"og:description": "<%= hoc_s(:meta_tag_og_description) %>" | ||
"og:image": "<%= 'https://' + request.host + '/images/social-media/hourofcode-2015-video-thumbnail.jpg' %>" | ||
"og:image:width": '1440' | ||
|
@@ -15,7 +20,7 @@ social: | |
"twitter:card": "player" | ||
"twitter:site": "@codeorg" | ||
"twitter:url": "https://hourofcode.com" | ||
"twitter:title": "<%= hoc_s(:meta_tag_twitter_title) %>" | ||
"twitter:title": "<%= title %>" | ||
"twitter:description": "<%= hoc_s(:meta_tag_twitter_description) %>" | ||
"twitter:image:src": "<%= 'https://' + request.host + '/images/social-media/hourofcode-2015-video-thumbnail.jpg' %>" | ||
"twitter:player": "<%= 'https://youtube.com/embed/KsOIlDT145A' %>" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1920 seems really large for a Twitter/OG image. Facebook seems to recommend min 1200 x 630 and Twitter 1024 x 512 pixels. @tanyaparker may know more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do keep it 1920, are both the images at least 1920?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! I added this because both images are 2mb+ 😕. We can go smaller, but I added an upper bound to match the existing
og:image:width
size.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully production will serve them smaller than 2mb+ when we use
fit-1920
and serve as JPGs?