Fix metadata and make thumbs work

This commit is contained in:
Thomas Zarebczan 2021-05-27 17:00:19 -04:00
parent 6043b6101b
commit 97a4f5fcab
No known key found for this signature in database
GPG key ID: D505010BDB4364BC
3 changed files with 7 additions and 5 deletions

View file

@ -8,6 +8,8 @@ exports.BACKUP = 'backup';
exports.CHANNEL = 'channel';
exports.DISCOVER = 'discover';
exports.BIG_HITS = 'big_hits';
exports.MOVIES = 'movies';
exports.MUSIC = 'music';
exports.COMMUNITY = 'community';
exports.ENLIGHTENMENT = 'enlightenment';
exports.FINANCE = 'finance';

View file

@ -28,7 +28,7 @@ module.exports.CATEGORY_METADATA = {
description: 'Pew pew bzzz gaming on Odysee',
image: 'https://spee.ch/category-gaming:5.jpg?quality=80&height=1200&width=627',
},
[PAGES.PRIMARY_CHEESE]: {
[PAGES.GENERAL]: {
title: 'Cheese',
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',

View file

@ -54,7 +54,7 @@ function getCategoryMeta(path) {
// Normal metadata with option to override certain values
//
function buildOgMetadata(overrideOptions = {}) {
const { title, description } = overrideOptions;
const { title, description, image } = overrideOptions;
const cleanDescription = removeMd(description || SITE_DESCRIPTION);
const head =
`<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:site_name" content="${SITE_NAME || SITE_TITLE}"/>\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:title" content="${
(title && title + OG_TITLE_SUFFIX) || OG_HOMEPAGE_TITLE || SITE_TITLE
(title && title + ' ' + OG_TITLE_SUFFIX) || OG_HOMEPAGE_TITLE || SITE_TITLE
}" />\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 property="fb:app_id" content="1673146449633983" />\n' +
`<link rel="canonical" content="${SITE_CANONICAL_URL || URL}"/>` +