diff --git a/static/index-web.html b/static/index-web.html index f34303615..248dcd0e6 100644 --- a/static/index-web.html +++ b/static/index-web.html @@ -5,7 +5,6 @@ - diff --git a/web/src/html.js b/web/src/html.js index ed764b9f1..8463180a2 100644 --- a/web/src/html.js +++ b/web/src/html.js @@ -8,6 +8,7 @@ const { OG_IMAGE_URL, SITE_DESCRIPTION, SITE_NAME, + FAVICON, } = require('../../config.js'); const { generateEmbedUrl, generateStreamUrl, generateDirectUrl } = require('../../ui/util/web'); const PAGES = require('../../ui/constants/pages'); @@ -82,20 +83,31 @@ function buildOgMetadata(overrideOptions = {}) { function conditionallyAddPWA() { let head = ''; if (DOMAIN === 'odysee.com') { - head += ''; + head += ''; head += ''; head += ''; } return head; } +function addFavicon() { + let head = ''; + head += ``; + return head; +} + function buildHead() { - const head = '' + conditionallyAddPWA() + buildOgMetadata() + ''; + const head = + '' + + addFavicon() + + conditionallyAddPWA() + + buildOgMetadata() + + ''; return head; } function buildBasicOgMetadata() { - const head = '' + buildOgMetadata() + ''; + const head = '' + addFavicon() + buildOgMetadata() + ''; return head; } @@ -128,6 +140,7 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) { let head = ''; + head += `${addFavicon()}`; head += ''; head += `${title}`; head += ``; diff --git a/web/src/rss.js b/web/src/rss.js index aba49f644..98684ab89 100644 --- a/web/src/rss.js +++ b/web/src/rss.js @@ -1,5 +1,5 @@ const { generateDownloadUrl } = require('../../ui/util/web'); -const { URL, SITE_NAME, LBRY_WEB_API } = require('../../config.js'); +const { URL, SITE_NAME, LBRY_WEB_API, FAVICON } = require('../../config.js'); const { Lbry } = require('lbry-redux'); const Feed = require('feed').Feed; @@ -82,7 +82,7 @@ async function getFeed(channelClaim, feedLink) { const title = value ? value.title : channelClaim.name; const options = { - favicon: URL + '/public/favicon.png', + favicon: FAVICON || URL + '/public/favicon.png', generator: SITE_NAME + ' RSS Feed', title: title + ' on ' + SITE_NAME, description: fmtDescription(value && value.description ? value.description : ''), diff --git a/web/src/xml.js b/web/src/xml.js index bad950406..9cd48fe44 100644 --- a/web/src/xml.js +++ b/web/src/xml.js @@ -1,11 +1,11 @@ -const { URL, SITE_TITLE } = require('../../config.js'); - +const { URL, SITE_TITLE, FAVICON } = require('../../config.js'); +const favicon = FAVICON || `${URL}/public/favicon.png`; function getOpenSearchXml() { return ( `${SITE_TITLE}` + `Search ${SITE_TITLE}` + 'UTF-8' + - `${URL}/public/favicon.png` + + `${favicon}` + `` + `${URL}` );