diff options
Diffstat (limited to 'app/views/layouts')
| -rw-r--r-- | app/views/layouts/_social_meta.html.erb | 34 | ||||
| -rw-r--r-- | app/views/layouts/application.html.erb | 4 |
2 files changed, 35 insertions, 3 deletions
diff --git a/app/views/layouts/_social_meta.html.erb b/app/views/layouts/_social_meta.html.erb new file mode 100644 index 00000000..9a86d26d --- /dev/null +++ b/app/views/layouts/_social_meta.html.erb | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | <% if (directive = robots_directive) %> | ||
| 2 | <meta name="robots" content="<%= directive %>"/> | ||
| 3 | <% end %> | ||
| 4 | |||
| 5 | <% if social_meta? %> | ||
| 6 | <meta name="description" content="<%= og_description %>"/> | ||
| 7 | |||
| 8 | <link rel="canonical" href="<%= og_canonical_url %>"/> | ||
| 9 | |||
| 10 | <meta property="og:site_name" content="<%= SocialHelper::OG_SITE_NAME %>"/> | ||
| 11 | <meta property="og:type" content="<%= og_type %>"/> | ||
| 12 | <meta property="og:url" content="<%= og_canonical_url %>"/> | ||
| 13 | <meta property="og:title" content="<%= og_title %>"/> | ||
| 14 | <meta property="og:description" content="<%= og_description %>"/> | ||
| 15 | |||
| 16 | <meta property="og:image" content="<%= og_image_url %>"/> | ||
| 17 | <meta property="og:image:width" content="<%= og_image_width %>"/> | ||
| 18 | <meta property="og:image:height" content="<%= og_image_height %>"/> | ||
| 19 | <meta property="og:image:alt" content="<%= og_image_alt %>"/> | ||
| 20 | |||
| 21 | <meta property="og:locale" content="<%= og_locale %>"/> | ||
| 22 | <% og_locale_alternates.each do |alternate| %> | ||
| 23 | <meta property="og:locale:alternate" content="<%= alternate %>"/> | ||
| 24 | <% end %> | ||
| 25 | |||
| 26 | <% if og_published_time %> | ||
| 27 | <meta property="article:published_time" content="<%= og_published_time %>"/> | ||
| 28 | <% end %> | ||
| 29 | |||
| 30 | <%# X ignores og:image unless the card type is declared, and falls back | ||
| 31 | to a small square thumbnail. twitter:image is deliberately absent: | ||
| 32 | with only twitter:card set, X reuses og:image. %> | ||
| 33 | <meta name="twitter:card" content="summary_large_image"/> | ||
| 34 | <% end %> | ||
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 6a31104a..5717cebf 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb | |||
| @@ -4,10 +4,8 @@ | |||
| 4 | <head> | 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| 6 | <meta name="viewport" content="width=device-width,initial-scale=1"/> | 6 | <meta name="viewport" content="width=device-width,initial-scale=1"/> |
| 7 | <meta name="description" content="Der Chaos Computer Club ist eine galaktische Gemeinschaft von Lebewesen für Informationsfreiheit und Technikfolgenabschätzung."/> | ||
| 8 | 7 | ||
| 9 | <meta property="og:image" content="https://www.ccc.de/images/chaosknoten.svg" /> | 8 | <%= render :partial => "layouts/social_meta" %> |
| 10 | <meta property="og:description" content="Der Chaos Computer Club ist eine galaktische Gemeinschaft von Lebewesen für Informationsfreiheit und Technikfolgenabschätzung." /> | ||
| 11 | 9 | ||
| 12 | <title><%= page_title %></title> | 10 | <title><%= page_title %></title> |
| 13 | <link rel="stylesheet" href="<%= mtime_busted_path('/stylesheets/ccc.css') %>"> | 11 | <link rel="stylesheet" href="<%= mtime_busted_path('/stylesheets/ccc.css') %>"> |
