favicon custom
html fav tag remove basic meta favi missing favicon recon
This commit is contained in:
parent
a145ce5df3
commit
408dd029eb
7 changed files with 21 additions and 13 deletions
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
|
@ -5,7 +5,6 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<link rel="icon" type="image/png" href="/public/favicon.png" />
|
||||
|
||||
<link rel="preload" href="/public/font/v1/300.woff" as="font" type="font/woff" crossorigin />
|
||||
<link rel="preload" href="/public/font/v1/300i.woff" as="font" type="font/woff" crossorigin />
|
||||
|
|
|
@ -38,13 +38,9 @@ export const getSearchQueryString = (query: string, options: any = {}) => {
|
|||
const encodedQuery = encodeURIComponent(query);
|
||||
const queryParams = [
|
||||
options.exact && !isSurroundedByQuotes(encodedQuery) ? `s="${encodedQuery}"` : `s=${encodedQuery}`,
|
||||
`free_only=true`,
|
||||
`size=${options.size || DEFAULT_SEARCH_SIZE}`,
|
||||
`from=${options.from || DEFAULT_SEARCH_RESULT_FROM}`,
|
||||
// `mediaType=${SEARCH_OPTIONS.MEDIA_VIDEO}`,
|
||||
// `claimType=${SEARCH_OPTIONS.INCLUDE_FILES}`,
|
||||
];
|
||||
|
||||
const { isBackgroundSearch } = options;
|
||||
const includeUserOptions = typeof isBackgroundSearch === 'undefined' ? false : !isBackgroundSearch;
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
@ -89,13 +90,24 @@ function conditionallyAddPWA() {
|
|||
return head;
|
||||
}
|
||||
|
||||
function addFavicon() {
|
||||
let head = '';
|
||||
head += `<link rel="icon" type="image/png" href="${FAVICON || './public/favicon.png'}" />`;
|
||||
return head;
|
||||
}
|
||||
|
||||
function buildHead() {
|
||||
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + conditionallyAddPWA() + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
||||
const head =
|
||||
'<!-- VARIABLE_HEAD_BEGIN -->' +
|
||||
addFavicon() +
|
||||
conditionallyAddPWA() +
|
||||
buildOgMetadata() +
|
||||
'<!-- VARIABLE_HEAD_END -->';
|
||||
return head;
|
||||
}
|
||||
|
||||
function buildBasicOgMetadata() {
|
||||
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
||||
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + addFavicon() + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
||||
return head;
|
||||
}
|
||||
|
||||
|
@ -128,6 +140,7 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) {
|
|||
|
||||
let head = '';
|
||||
|
||||
head += `${addFavicon()}`;
|
||||
head += '<meta charset="utf8"/>';
|
||||
head += `<title>${title}</title>`;
|
||||
head += `<meta name="description" content="${cleanDescription}"/>`;
|
||||
|
|
|
@ -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 : ''),
|
||||
|
|
|
@ -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 (
|
||||
`<ShortName>${SITE_TITLE}</ShortName>` +
|
||||
`<Description>Search ${SITE_TITLE}</Description>` +
|
||||
'<InputEncoding>UTF-8</InputEncoding>' +
|
||||
`<Image width="32" height="32" type="image/png">${URL}/public/favicon.png</Image>` +
|
||||
`<Image width="32" height="32" type="image/png">${favicon}</Image>` +
|
||||
`<Url type="text/html" method="get" template="${URL}/$/search?q={searchTerms}"/>` +
|
||||
`<moz:SearchForm>${URL}</moz:SearchForm>`
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue