Merge pull request #428 from mozilla/add-twitter-og-cards

add twitter and open graph cards
This commit is contained in:
Danny Coates 2017-08-11 14:12:44 -07:00 committed by GitHub
commit e142d76cb4
5 changed files with 20 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -51,6 +51,11 @@ const conf = convict({
format: Boolean,
default: false,
env: 'L10N_DEV'
},
base_url: {
format: 'url',
default: 'https://send.firefox.com',
env: 'BASE_URL'
}
});

View File

@ -58,7 +58,10 @@ app.engine(
partialsDir: 'views/partials/',
helpers: {
availableLanguages,
l10nDev: conf.l10n_dev
l10nDev: conf.l10n_dev,
baseUrl: conf.base_url,
title: 'Firefox Send',
description: 'Encrypt and send files with a link that automatically expires to ensure your important documents dont stay online forever.'
}
})
);

View File

@ -7,7 +7,17 @@
<meta name="defaultLanguage" content="en-US">
<meta name="availableLanguages" content="{{availableLanguages}}">
<title>Firefox Send</title>
<meta property="og:title" content="{{title}}"/>
<meta name="twitter:title" content="{{title}}"/>
<meta name="description" content="{{description}}"/>
<meta property="og:description" content="{{description}}"/>
<meta name="twitter:description" content="{{description}}"/>
<meta name="twitter:card" content="summary"/>
<meta property="og:image" content="{{baseUrl}}/resources/send-fb.jpg"/>
<meta name="twitter:image" content="{{baseUrl}}/resources/send-twitter.jpg"/>
<meta property="og:url" content="{{baseUrl}}"/>
<title>{{title}}</title>
<link rel="stylesheet" type="text/css" href="/main.css" />
{{#if fira}}