Fix metadata and make thumbs work
This commit is contained in:
parent
6043b6101b
commit
97a4f5fcab
3 changed files with 7 additions and 5 deletions
|
@ -8,6 +8,8 @@ exports.BACKUP = 'backup';
|
||||||
exports.CHANNEL = 'channel';
|
exports.CHANNEL = 'channel';
|
||||||
exports.DISCOVER = 'discover';
|
exports.DISCOVER = 'discover';
|
||||||
exports.BIG_HITS = 'big_hits';
|
exports.BIG_HITS = 'big_hits';
|
||||||
|
exports.MOVIES = 'movies';
|
||||||
|
exports.MUSIC = 'music';
|
||||||
exports.COMMUNITY = 'community';
|
exports.COMMUNITY = 'community';
|
||||||
exports.ENLIGHTENMENT = 'enlightenment';
|
exports.ENLIGHTENMENT = 'enlightenment';
|
||||||
exports.FINANCE = 'finance';
|
exports.FINANCE = 'finance';
|
||||||
|
|
|
@ -28,7 +28,7 @@ module.exports.CATEGORY_METADATA = {
|
||||||
description: 'Pew pew bzzz gaming on Odysee',
|
description: 'Pew pew bzzz gaming on Odysee',
|
||||||
image: 'https://spee.ch/category-gaming:5.jpg?quality=80&height=1200&width=627',
|
image: 'https://spee.ch/category-gaming:5.jpg?quality=80&height=1200&width=627',
|
||||||
},
|
},
|
||||||
[PAGES.PRIMARY_CHEESE]: {
|
[PAGES.GENERAL]: {
|
||||||
title: 'Cheese',
|
title: 'Cheese',
|
||||||
description: 'Cheese is the answer to life, the universe, and everything. We have primo cheese on Odysee',
|
description: 'Cheese is the answer to life, the universe, and everything. We have primo cheese on Odysee',
|
||||||
image: 'https://spee.ch/category-primary:5.jpg?quality=80&height=1200&width=627',
|
image: 'https://spee.ch/category-primary:5.jpg?quality=80&height=1200&width=627',
|
||||||
|
|
|
@ -54,7 +54,7 @@ function getCategoryMeta(path) {
|
||||||
// Normal metadata with option to override certain values
|
// Normal metadata with option to override certain values
|
||||||
//
|
//
|
||||||
function buildOgMetadata(overrideOptions = {}) {
|
function buildOgMetadata(overrideOptions = {}) {
|
||||||
const { title, description } = overrideOptions;
|
const { title, description, image } = overrideOptions;
|
||||||
const cleanDescription = removeMd(description || SITE_DESCRIPTION);
|
const cleanDescription = removeMd(description || SITE_DESCRIPTION);
|
||||||
const head =
|
const head =
|
||||||
`<title>${SITE_TITLE}</title>\n` +
|
`<title>${SITE_TITLE}</title>\n` +
|
||||||
|
@ -62,13 +62,13 @@ function buildOgMetadata(overrideOptions = {}) {
|
||||||
`<meta property="og:title" content="${title || OG_HOMEPAGE_TITLE || SITE_TITLE}" />\n` +
|
`<meta property="og:title" content="${title || OG_HOMEPAGE_TITLE || SITE_TITLE}" />\n` +
|
||||||
`<meta property="og:site_name" content="${SITE_NAME || SITE_TITLE}"/>\n` +
|
`<meta property="og:site_name" content="${SITE_NAME || SITE_TITLE}"/>\n` +
|
||||||
`<meta property="og:description" content="${cleanDescription}" />\n` +
|
`<meta property="og:description" content="${cleanDescription}" />\n` +
|
||||||
`<meta property="og:image" content="${OG_IMAGE_URL || `${URL}/public/v2-og.png`}" />\n` +
|
`<meta property="og:image" content="${image || OG_IMAGE_URL || `${URL}/public/v2-og.png`}" />\n` +
|
||||||
'<meta name="twitter:card" content="summary_large_image"/>\n' +
|
'<meta name="twitter:card" content="summary_large_image"/>\n' +
|
||||||
`<meta name="twitter:title" content="${
|
`<meta name="twitter:title" content="${
|
||||||
(title && title + OG_TITLE_SUFFIX) || OG_HOMEPAGE_TITLE || SITE_TITLE
|
(title && title + ' ' + OG_TITLE_SUFFIX) || OG_HOMEPAGE_TITLE || SITE_TITLE
|
||||||
}" />\n` +
|
}" />\n` +
|
||||||
`<meta name="twitter:description" content="${cleanDescription}" />\n` +
|
`<meta name="twitter:description" content="${cleanDescription}" />\n` +
|
||||||
`<meta name="twitter:image" content="${OG_IMAGE_URL || `${URL}/public/v2-og.png`}"/>\n` +
|
`<meta name="twitter:image" content="${image || OG_IMAGE_URL || `${URL}/public/v2-og.png`}"/>\n` +
|
||||||
`<meta name="twitter:url" content="${URL}" />\n` +
|
`<meta name="twitter:url" content="${URL}" />\n` +
|
||||||
'<meta property="fb:app_id" content="1673146449633983" />\n' +
|
'<meta property="fb:app_id" content="1673146449633983" />\n' +
|
||||||
`<link rel="canonical" content="${SITE_CANONICAL_URL || URL}"/>` +
|
`<link rel="canonical" content="${SITE_CANONICAL_URL || URL}"/>` +
|
||||||
|
|
Loading…
Reference in a new issue