use canonical urls in createChannelMetaTags

This commit is contained in:
Travis Eden 2018-10-29 18:07:28 -04:00
parent b41f985d2b
commit 7575ab937f

View file

@ -1,6 +1,7 @@
import siteConfig from '@config/siteConfig.json'; import siteConfig from '@config/siteConfig.json';
import determineContentTypeFromExtension from './determineContentTypeFromExtension'; import determineContentTypeFromExtension from './determineContentTypeFromExtension';
import createMetaTagsArray from './createMetaTagsArray'; import createMetaTagsArray from './createMetaTagsArray';
import createCanonicalLink from '../../../utils/createCanonicalLink';
const { const {
details: { details: {
@ -14,7 +15,7 @@ const {
} = siteConfig; } = siteConfig;
export const createChannelMetaTags = (channel) => { export const createChannelMetaTags = (channel) => {
const { name, longId } = channel; const { name, shortId } = channel;
const metaTags = { const metaTags = {
// page detail tags // page detail tags
'og:title' : `${name} on ${siteTitle}`, 'og:title' : `${name} on ${siteTitle}`,
@ -22,7 +23,7 @@ export const createChannelMetaTags = (channel) => {
'og:description' : `${name}, a channel on ${siteTitle}`, 'og:description' : `${name}, a channel on ${siteTitle}`,
'twitter:description': `${name}, a channel on ${siteTitle}`, 'twitter:description': `${name}, a channel on ${siteTitle}`,
// url // url
'og:url' : `${host}/${name}:${longId}`, 'og:url' : `${host}/${createCanonicalLink({ channel })}`,
// site info // site info
'og:site_name' : siteTitle, 'og:site_name' : siteTitle,
'twitter:site' : twitter, 'twitter:site' : twitter,