add twitter and open graph cards

This commit is contained in:
John Gruen 2017-08-04 12:40:55 +02:00
parent a990d78bc0
commit dafe00cabb
4 changed files with 25 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

@ -38,6 +38,16 @@ function prodLangs() {
const availableLanguages = conf.l10n_dev ? allLangs() : prodLangs();
const envURL = (env) => {
switch (env) {
case 'test':
return 'https://send.stage.mozaws.net';
case 'development':
return 'https://testpilot.dev.mozaws.net';
}
return 'https://send.firefox.com';
}
if (conf.env === 'development') {
const webpack = require('webpack');
const webpackDevMiddleware = require('webpack-dev-middleware');
@ -58,7 +68,10 @@ app.engine(
partialsDir: 'views/partials/',
helpers: {
availableLanguages,
l10nDev: conf.l10n_dev
l10nDev: conf.l10n_dev,
envURL: envURL(conf.env),
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="Firefox Send"/>
<meta name="twitter:title" content="Firefox Send"/>
<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="{{envURL}}/resources/send-fb.jpg"/>
<meta name="twitter:image" content="{{envURL}}/resources/send-twitter.jpg"/>
<meta property="og:url" content="{{envURL}}"/>
<title>{{title}}</title>
<link rel="stylesheet" type="text/css" href="/main.css" />
{{#if fira}}