Add favicon for Google Search results (#7205)

- A side-quest from "7166 improve search metadata".
- The favicon must be from the same domain as the homepage, so the CDN URL couldn't be used, hence the additional upload.
- The favicon also needs to be multiples of 48x48 and above.
    - Wanted to use SVG for the smallest size possible, but seems like Safari does not fully support it. Got Dejan to give me a reasonably-sized PNG.

## Reference
https://developers.google.com/search/docs/advanced/appearance/favicon-in-search#guidelines
This commit is contained in:
infinite-persistence 2021-10-01 20:09:02 +08:00 committed by GitHub
parent dac8d711d1
commit d3be8726fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -13,6 +13,8 @@
<link rel="preload" href="/public/font/v1/700.woff" as="font" type="font/woff" crossorigin /> <link rel="preload" href="/public/font/v1/700.woff" as="font" type="font/woff" crossorigin />
<link rel="preload" href="/public/font/v1/700i.woff" as="font" type="font/woff" crossorigin /> <link rel="preload" href="/public/font/v1/700i.woff" as="font" type="font/woff" crossorigin />
<link rel="shortcut icon" href="/public/favicon-spaceman.png">
<style> <style>
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';

View file

@ -8,7 +8,8 @@ const STATIC_ASSET_PATHS = [
'/public/font/v1/400i.woff', '/public/font/v1/400i.woff',
'/public/font/v1/700.woff', '/public/font/v1/700.woff',
'/public/font/v1/700i.woff', '/public/font/v1/700i.woff',
'/public/favicon.png', '/public/favicon.png', // LBRY icon
'/public/favicon-spaceman.png',
'/public/img/busy.gif', '/public/img/busy.gif',
'/public/img/fileRenderPlaceholder.png', '/public/img/fileRenderPlaceholder.png',
'/public/img/gerbil-happy.png', '/public/img/gerbil-happy.png',

View file

@ -50,6 +50,11 @@ const copyWebpackCommands = [
to: `${DIST_ROOT}/public/favicon.png`, to: `${DIST_ROOT}/public/favicon.png`,
force: true, force: true,
}, },
{
from: `${STATIC_ROOT}/img/favicon-spaceman.png`,
to: `${DIST_ROOT}/public/favicon-spaceman.png`,
force: true,
},
{ {
from: `${STATIC_ROOT}/img/v2-og.png`, from: `${STATIC_ROOT}/img/v2-og.png`,
to: `${DIST_ROOT}/public/v2-og.png`, to: `${DIST_ROOT}/public/v2-og.png`,