Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
fix(core): fix twitter meta tags (#1581)
Browse files Browse the repository at this point in the history
I believe the Twitter meta tags are outdated and this PR fixes them.
Taking into account the current MEAN.js tags and the Twitter docs, the most similar feature I found
is the Twitter Summary Card (https://dev.twitter.com/cards/types/summary).
  • Loading branch information
pgrodrigues authored and lirantal committed Oct 19, 2016
1 parent 4dd8669 commit 59c11c6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/env/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = {
callbackURL: '/api/auth/facebook/callback'
},
twitter: {
username: '@TWITTER_USERNAME',
clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY',
clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET',
callbackURL: '/api/auth/twitter/callback'
Expand Down
1 change: 1 addition & 0 deletions config/env/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module.exports = {
callbackURL: '/api/auth/facebook/callback'
},
twitter: {
username: '@TWITTER_USERNAME',
clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY',
clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET',
callbackURL: '/api/auth/twitter/callback'
Expand Down
1 change: 1 addition & 0 deletions config/env/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
callbackURL: '/api/auth/facebook/callback'
},
twitter: {
username: '@TWITTER_USERNAME',
clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY',
clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET',
callbackURL: '/api/auth/twitter/callback'
Expand Down
1 change: 1 addition & 0 deletions config/lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports.initLocalVariables = function (app) {
app.locals.keywords = config.app.keywords;
app.locals.googleAnalyticsTrackingID = config.app.googleAnalyticsTrackingID;
app.locals.facebookAppId = config.facebook.clientID;
app.locals.twitterUsername = config.twitter.username;
app.locals.jsFiles = config.files.client.js;
app.locals.cssFiles = config.files.client.css;
app.locals.livereload = config.livereload;
Expand Down
3 changes: 2 additions & 1 deletion modules/core/server/views/layout.server.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
<meta property="og:type" content="website">

<!-- Twitter META -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="{{twitterUsername}}">
<meta name="twitter:title" content="{{title}}">
<meta name="twitter:description" content="{{description}}">
<meta name="twitter:url" content="{{url}}">
<meta name="twitter:image" content="{{logo}}">

<!-- Fav Icon -->
Expand Down

0 comments on commit 59c11c6

Please sign in to comment.