added default thumb to channel meta tags

This commit is contained in:
bill bittner 2018-07-18 14:49:22 -07:00
parent 264f7dd986
commit 1651c24529
2 changed files with 19 additions and 12 deletions

View file

@ -43,10 +43,8 @@ var createBasicMetaTags = function createBasicMetaTags(_ref) {
}, { }, {
property: 'twitter:title', property: 'twitter:title',
content: siteTitle content: siteTitle
}, { }, // {property: 'og:url', content: siteHost},
property: 'og:url', {
content: siteHost
}, {
property: 'og:site_name', property: 'og:site_name',
content: siteTitle content: siteTitle
}, { }, {
@ -77,7 +75,8 @@ var createChannelMetaTags = function createChannelMetaTags(_ref2) {
var siteHost = _ref2.siteHost, var siteHost = _ref2.siteHost,
siteTitle = _ref2.siteTitle, siteTitle = _ref2.siteTitle,
siteTwitter = _ref2.siteTwitter, siteTwitter = _ref2.siteTwitter,
channel = _ref2.channel; channel = _ref2.channel,
defaultThumbnail = _ref2.defaultThumbnail;
var name = channel.name, var name = channel.name,
longId = channel.longId; longId = channel.longId;
return [{ return [{
@ -86,10 +85,8 @@ var createChannelMetaTags = function createChannelMetaTags(_ref2) {
}, { }, {
property: 'twitter:title', property: 'twitter:title',
content: "".concat(name, " on ").concat(siteTitle) content: "".concat(name, " on ").concat(siteTitle)
}, { }, // {property: 'og:url', content: `${siteHost}/${name}:${longId}`},
property: 'og:url', {
content: "".concat(siteHost, "/").concat(name, ":").concat(longId)
}, {
property: 'og:site_name', property: 'og:site_name',
content: siteTitle content: siteTitle
}, { }, {
@ -101,6 +98,12 @@ var createChannelMetaTags = function createChannelMetaTags(_ref2) {
}, { }, {
property: 'twitter:card', property: 'twitter:card',
content: 'summary' content: 'summary'
}, {
property: 'og:image',
content: defaultThumbnail
}, {
property: 'twitter:image',
content: defaultThumbnail
}]; }];
}; };
@ -128,7 +131,7 @@ var createAssetMetaTags = function createAssetMetaTags(_ref3) {
content: ogTitle content: ogTitle
}, { }, {
property: 'og:url', property: 'og:url',
content: showUrl content: source
}, { }, {
property: 'og:site_name', property: 'og:site_name',
content: siteTitle content: siteTitle
@ -259,7 +262,8 @@ var createMetaTags = function createMetaTags(_ref4) {
siteHost: siteHost, siteHost: siteHost,
siteTitle: siteTitle, siteTitle: siteTitle,
siteTwitter: siteTwitter, siteTwitter: siteTwitter,
channel: channel channel: channel,
defaultThumbnail: defaultThumbnail
}); });
} }

View file

@ -34,7 +34,7 @@ const createBasicMetaTags = ({siteHost, siteDescription, siteTitle, siteTwitter,
]; ];
}; };
const createChannelMetaTags = ({siteHost, siteTitle, siteTwitter, channel}) => { const createChannelMetaTags = ({siteHost, siteTitle, siteTwitter, channel, defaultThumbnail}) => {
const { name, longId } = channel; const { name, longId } = channel;
return [ return [
{property: 'og:title', content: `${name} on ${siteTitle}`}, {property: 'og:title', content: `${name} on ${siteTitle}`},
@ -44,6 +44,8 @@ const createChannelMetaTags = ({siteHost, siteTitle, siteTwitter, channel}) => {
{property: 'og:description', content: `${name}, a channel on ${siteTitle}`}, {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},
{property: 'twitter:site', content: siteTwitter}, {property: 'twitter:site', content: siteTwitter},
{property: 'twitter:card', content: 'summary'}, {property: 'twitter:card', content: 'summary'},
{property: 'og:image', content: defaultThumbnail},
{property: 'twitter:image', content: defaultThumbnail},
]; ];
}; };
@ -111,6 +113,7 @@ export const createMetaTags = ({ siteDescription, siteHost, siteTitle, siteTwitt
siteTitle, siteTitle,
siteTwitter, siteTwitter,
channel, channel,
defaultThumbnail,
}); });
} }
return createBasicMetaTags({ return createBasicMetaTags({