-
Notifications
You must be signed in to change notification settings - Fork 1.6k
add twitter and open graph cards #428
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not convinced this is a thing. I don't know how to tell the detect whether we're running on stage vs prod on the server. |
||
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 don’t stay online forever.' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note, this doesn't get localized, maybe that's not possible... |
||
} | ||
}) | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: It may be nice to use |
||
<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}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using this to set the URL so this can be tested on dev environments. Not super familiar with convict, but maybe this would be better done in config