Skip to content

Commit b56ff8c

Browse files
ddyyjust3ws
authored andcommitted
Add Twitter Card markup to Individual team pages
1 parent 0594cb1 commit b56ff8c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

app/views/layouts/application.html.haml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
!!! 5
22
%html.no-js{lang: 'en'}
33
%head
4+
=metamagic
45
/[if IE] <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
56
%meta{ content: 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type' }
67
%title= page_title(yield(:page_title))

app/views/teams/premium.html.haml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
- if ENV['ENABLE_TWITTER_CARDS']
2+
- meta twitter: {card: "summary"}
3+
- meta twitter: {site: "@coderwall"}
4+
- meta twitter: {title: sanitize(@team.name)}
5+
- meta twitter: {url: teamname_path(@team.slug)}
6+
- meta twitter: {description: @team.about}
7+
- meta twitter: {image: @team.avatar_url}
8+
- meta twitter: {creator: {id: @team.twitter}}
9+
110
-content_for :head do
211
=stylesheet_link_tag 'premium-teams'
312

0 commit comments

Comments
 (0)