Commit 89a898cf authored by Maarten de Waard's avatar Maarten de Waard 🤘🏻
Browse files

Merge branch '58-preview-link-appears-always-in-english' into 'master'

Resolve "Preview link appears always in English"

Closes #58

See merge request totem/website!65
parents 45ee630c d754f118
......@@ -51,7 +51,7 @@ Temporary Items
/.cache
/.sass-cache
/build
/data
/data/courses.yml
/vendor
# Editor related files
......
......@@ -29,4 +29,10 @@ gem 'therubyracer'
# Html parsing
gem 'ruby-cheerio'
gem 'middleman-ogp', '1.2'
# Wait for these PRs to be merged:
# https://github.com/ngs/middleman-ogp/pull/16
# https://github.com/ngs/middleman-ogp/pull/17
# gem 'middleman-ogp', '1.4'
gem 'middleman-ogp',
:git => 'https://github.com/greenhost/middleman-ogp',
:ref => 'override-all-namespaces-and-add-locale'
GIT
remote: https://github.com/greenhost/middleman-ogp
revision: 203170f04ffc6350d6913c6545e760d2eefc3a6c
ref: override-all-namespaces-and-add-locale
specs:
middleman-ogp (1.4.0)
middleman-core (>= 4.0)
GIT
remote: https://github.com/middleman/middleman
revision: 5426f9dff9094a5290dd7f70f006963ca0c8cec7
......@@ -85,8 +93,6 @@ 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)
......@@ -149,7 +155,7 @@ DEPENDENCIES
middleman!
middleman-autoprefixer (~> 2.7)
middleman-livereload
middleman-ogp (= 1.2)
middleman-ogp!
middleman-sprockets
rails-assets-bootstrap!
rails-assets-jquery!
......@@ -162,4 +168,4 @@ DEPENDENCIES
therubyracer
BUNDLED WITH
1.16.5
1.17.3
......@@ -212,6 +212,7 @@ end
# Activate OGP plugin. Note that this does not have i18n support, so that is
# added manually in main.slim
activate :ogp do |ogp|
ogp.auto = ['title', 'description', 'locale', 'url']
# Default opengraph data (sets image to Totem logo)
ogp.namespaces = {
og: data.ogp.og,
......
---
image:
'': https://totem-project.org/static/totem-logo.png
secure_url: https://totem-project.org/static/totem-logo.png
'': https://totem-project.org/static/totem-social-share.png
secure_url: https://totem-project.org/static/totem-social-share.png
type: image/png
width: 600
height: 600
width: 930
height: 497
title: Totem project
url: https://totem-project.org
description: Digital Security training for activists and journalists
......
---
card: summary
image: https://totem-project.org/static/totem-logo.png
image: https://totem-project.org/static/totem-social-share.png
title: Totem project
description: Digital Security training for activists and journalists
---
---
<%% Set translated description for OGP tags %>
<% current_page.data['description'] = t :intro %>
<% text_class = config[:locales][I18n.locale][:text_class] %>
<!-- Header, Call to Action -->
<header class="masthead">
......
---
description: سياسة الخصوصية
---
<header class="masthead"></header>
<section id="side-page">
......
---
description: Privacy policy
---
<header class="masthead"></header>
<section id="side-page">
......
---
description: Política de privacidad
---
<header class="masthead"></header>
<section id="side-page">
......
---
description: سیاست محرمانگی
---
<header class="masthead"></header>
<section id="side-page">
......
---
description: Politique de confidentialité
---
<header class="masthead"></header>
<section id="side-page">
......
---
---
<% current_page.data['description'] = t :terms_of_use%>
<header class="masthead">
</header>
......
Markdown is supported
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