updated seo tags to match routes
This commit is contained in:
parent
6ee72dabbb
commit
824b5b4c82
3 changed files with 7 additions and 7 deletions
|
@ -46,9 +46,9 @@ const createChannelMetaTags = ({siteHost, siteTitle, siteTwitter, channel}) => {
|
|||
const createAssetMetaTags = ({siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail}) => {
|
||||
const { claimData } = asset;
|
||||
const { contentType } = claimData;
|
||||
const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;
|
||||
const videoEmbedUrl = `${siteHost}/video-embed/${claimData.name}/${claimData.claimId}`;
|
||||
const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;
|
||||
const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;
|
||||
const source = `${siteHost}/asset/${claimData.name}/${claimData.claimId}}`;
|
||||
const ogTitle = claimData.title || claimData.name;
|
||||
const ogDescription = claimData.description || defaultDescription;
|
||||
const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);
|
||||
|
@ -70,7 +70,7 @@ const createAssetMetaTags = ({siteHost, siteTitle, siteTwitter, asset, defaultDe
|
|||
metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});
|
||||
metaTags.push({property: 'og:type', content: 'video'});
|
||||
metaTags.push({property: 'twitter:card', content: 'player'});
|
||||
metaTags.push({property: 'twitter:player', content: embedUrl});
|
||||
metaTags.push({property: 'twitter:player', content: videoEmbedUrl});
|
||||
metaTags.push({property: 'twitter:player:width', content: 600});
|
||||
metaTags.push({property: 'twitter:text:player_width', content: 600});
|
||||
metaTags.push({property: 'twitter:player:height', content: 337});
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
const { details: { host } } = require('@config/siteConfig');
|
||||
|
||||
const sendEmbedPage = ({ params }, res) => {
|
||||
const sendVideoEmbedPage = ({ params }, res) => {
|
||||
const claimId = params.claimId;
|
||||
const name = params.name;
|
||||
// get and render the content
|
||||
res.status(200).render('embed', { layout: 'embed', host, claimId, name });
|
||||
};
|
||||
|
||||
module.exports = sendEmbedPage;
|
||||
module.exports = sendVideoEmbedPage;
|
|
@ -1,5 +1,5 @@
|
|||
const handlePageRequest = require('../../controllers/pages/sendReactApp');
|
||||
// const handleEmbedRequest = require('../../controllers/pages/sendEmbedPage');
|
||||
const handleVideoEmbedRequest = require('../../controllers/pages/sendVideoEmbedPage');
|
||||
const redirect = require('../../controllers/utils/redirect');
|
||||
|
||||
module.exports = (app) => {
|
||||
|
@ -10,5 +10,5 @@ module.exports = (app) => {
|
|||
app.get('/popular', handlePageRequest);
|
||||
app.get('/new', handlePageRequest);
|
||||
app.get('/multisite', handlePageRequest);
|
||||
// app.get('/embed/:claimId/:name', handleEmbedRequest); // route to send embedable video player (for twitter)
|
||||
app.get('/video-embed/:name/:claimId', handleVideoEmbedRequest); // for twitter
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue