Skip to content

Commit

Permalink
Add favicon for Google Search results (#7205)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
infinite-persistence authored Oct 1, 2021
1 parent dac8d71 commit d3be872
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Binary file added static/img/favicon-spaceman.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions static/index-web.html
Original file line number Diff line number Diff line change
Expand Up @@ -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/700i.woff" as="font" type="font/woff" crossorigin />

<link rel="shortcut icon" href="/public/favicon-spaceman.png">

<style>
@font-face {
font-family: 'Inter';
Expand Down
3 changes: 2 additions & 1 deletion web/middleware/cache-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const STATIC_ASSET_PATHS = [
'/public/font/v1/400i.woff',
'/public/font/v1/700.woff',
'/public/font/v1/700i.woff',
'/public/favicon.png',
'/public/favicon.png', // LBRY icon
'/public/favicon-spaceman.png',
'/public/img/busy.gif',
'/public/img/fileRenderPlaceholder.png',
'/public/img/gerbil-happy.png',
Expand Down
5 changes: 5 additions & 0 deletions web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ const copyWebpackCommands = [
to: `${DIST_ROOT}/public/favicon.png`,
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`,
to: `${DIST_ROOT}/public/v2-og.png`,
Expand Down

0 comments on commit d3be872

Please sign in to comment.