Skip to content

Commit e4884ab

Browse files
committed
Removes outdated rel='image_src'
Replaces that with new Open Graph meta tags. Closes #2335.
1 parent ec84f05 commit e4884ab

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

app/views/errors/error.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
!!!
22
%html
33
%head
4-
%link{ rel: 'image_src', href: '/assets/logo-square.png', :alt => "codebar logo" }
4+
= render partial: 'meta_tags'
55
= favicon_link_tag 'favicon.ico'
66
%title codebar.io - Page not found
77
:css

app/views/errors/not_found.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
!!!
22
%html
33
%head
4-
%link{ rel: 'image_src', href: '/assets/logo-square.png', :alt => "codebar logo" }
4+
= render partial: 'meta_tags'
55
= favicon_link_tag 'favicon.ico'
66
%title codebar.io - Page not found
77
:css
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
%meta{ property: 'og:title', content: 'codebar' }
2+
%meta{ property: 'og:type', content: 'website' }
3+
%meta{ property: 'og:url', content: request.original_url }
4+
%meta{ property: 'og:image', content: image_url('logo-square.png') }
5+
%meta{ property: 'og:description', content: 'Making tech more diverse and welcoming by bringing people together and helping teach programming skills.' }
6+
%meta{ property: 'og:site_name', content: 'codebar' }
7+
%meta{ property: 'og:locale', content: 'en_GB' }
8+
-# Only Twitter-specific tag needed
9+
%meta{ name: 'twitter:card', content: image_url('logo-square.png') }

app/views/layouts/application.html.haml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,12 @@
1010

1111
- if content_for? :meta_tags
1212
= yield :meta_tags
13-
- else
14-
%meta{ property: 'og:title', content: 'codebar' }
15-
%meta{ property: 'og:type', content: 'website' }
16-
%meta{ property: 'og:url', content: request.original_url }
17-
%meta{ property: 'og:image', content: image_url('logo-square.png') }
18-
%meta{ property: 'og:description', content: 'Making tech more diverse and welcoming by bringing people together and helping teach programming skills.' }
19-
%meta{ property: 'og:site_name', content: 'codebar' }
20-
%meta{ property: 'og:locale', content: 'en_GB' }
21-
-# Only Twitter-specific tag needed
22-
%meta{ name: 'twitter:card', content: image_url('logo-square.png') }
13+
- else
14+
= render partial: 'layouts/meta_tags'
2315

2416
%link{ rel: 'icon', sizes: '196x196', href: '/Icon-196.png'}
2517
%link{ rel: 'icon', sizes: '128x128', href: '/Icon-128.png'}
2618
%link{ rel: 'apple-touch-icon', sizes: '128x128', href: '/Icon-128.png'}
27-
%link{ rel: 'image_src', href: '/assets/logo-square.png', alt: 'codebar logo' }
2819

2920
%title= retrieve_title
3021
= favicon_link_tag 'favicon.ico'

0 commit comments

Comments
 (0)