Verified Commit aa3aa206 authored by Maarten de Waard's avatar Maarten de Waard 🤘🏻
Browse files

add opengraph data

parent c332bb3b
......@@ -29,4 +29,4 @@ gem 'therubyracer'
# Html parsing
gem 'ruby-cheerio'
gem 'middleman-ogp', '1.2'
......@@ -85,6 +85,8 @@ GEM
em-websocket (~> 0.5.1)
middleman-core (>= 3.3)
rack-livereload (~> 0.3.15)
middleman-ogp (1.2.0)
middleman-core (>= 3.2)
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
......@@ -147,6 +149,7 @@ DEPENDENCIES
middleman!
middleman-autoprefixer (~> 2.7)
middleman-livereload
middleman-ogp (= 1.2)
middleman-sprockets
rails-assets-bootstrap!
rails-assets-jquery!
......
......@@ -107,3 +107,15 @@ configure :development do
ignore: [/^-.*$/]
)
end
# Activate OGP plugin. Note that this does not have i18n support, so that is
# added manually in main.slim
activate :ogp do |ogp|
# Default opengraph data (sets image to Totem logo)
ogp.namespaces = {
og: data.ogp.og
}
# Automatically enables og:url tag
ogp.base_url = 'https://totem-project.org'
end
image:
'': https://totem-project.org/static/totem-logo.png
secure_url: https://totem-project.org/static/totem-logo.png
type: image/png
width: 600
height: 600
title: Totem project
url: https://totem-project.org
description: Digital Security training for activists and journalists
locale: en_GB
......@@ -15,6 +15,9 @@
<%= config[:site_title] %>
<% end %>
</title>
<% ogp_tags do|name, value| %>
<meta property="<%= name %>" content="<%= value %>" />
<% end %>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment