mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-23 04:04:27 +08:00
fix(core): update favicon (#12581)
not changing the favicon.ico file to make sure the change will be updated on the user's browser to get rid of caching <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style** - Updated the favicon URL across the application and link previews to include a version query parameter (`?v=2`) for better cache control. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -67,7 +67,7 @@ Generated by [AVA](https://avajs.dev).
|
|||||||
{
|
{
|
||||||
description: 'Test Description',
|
description: 'Test Description',
|
||||||
favicons: [
|
favicons: [
|
||||||
'http://example.com/favicon.ico',
|
'http://example.com/favicon.ico?v=2',
|
||||||
],
|
],
|
||||||
images: [
|
images: [
|
||||||
'http://example.com/image.png',
|
'http://example.com/image.png',
|
||||||
@@ -82,7 +82,7 @@ Generated by [AVA](https://avajs.dev).
|
|||||||
{
|
{
|
||||||
charset: 'gbk',
|
charset: 'gbk',
|
||||||
favicons: [
|
favicons: [
|
||||||
'http://example.com/favicon.ico',
|
'http://example.com/favicon.ico?v=2',
|
||||||
],
|
],
|
||||||
images: [],
|
images: [],
|
||||||
title: '你好,世界。',
|
title: '你好,世界。',
|
||||||
@@ -95,7 +95,7 @@ Generated by [AVA](https://avajs.dev).
|
|||||||
{
|
{
|
||||||
charset: 'shift_jis',
|
charset: 'shift_jis',
|
||||||
favicons: [
|
favicons: [
|
||||||
'http://example.com/favicon.ico',
|
'http://example.com/favicon.ico?v=2',
|
||||||
],
|
],
|
||||||
images: [],
|
images: [],
|
||||||
title: 'こんにちは、世界。',
|
title: 'こんにちは、世界。',
|
||||||
@@ -108,7 +108,7 @@ Generated by [AVA](https://avajs.dev).
|
|||||||
{
|
{
|
||||||
charset: 'big5',
|
charset: 'big5',
|
||||||
favicons: [
|
favicons: [
|
||||||
'http://example.com/favicon.ico',
|
'http://example.com/favicon.ico?v=2',
|
||||||
],
|
],
|
||||||
images: [],
|
images: [],
|
||||||
title: '你好,世界。',
|
title: '你好,世界。',
|
||||||
@@ -121,7 +121,7 @@ Generated by [AVA](https://avajs.dev).
|
|||||||
{
|
{
|
||||||
charset: 'euc-kr',
|
charset: 'euc-kr',
|
||||||
favicons: [
|
favicons: [
|
||||||
'http://example.com/favicon.ico',
|
'http://example.com/favicon.ico?v=2',
|
||||||
],
|
],
|
||||||
images: [],
|
images: [],
|
||||||
title: '안녕하세요, 세계.',
|
title: '안녕하세요, 세계.',
|
||||||
|
|||||||
Binary file not shown.
@@ -178,7 +178,7 @@ export class DocRendererController {
|
|||||||
<link rel="manifest" href="/manifest.json" />
|
<link rel="manifest" href="/manifest.json" />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||||
<link rel="icon" sizes="192x192" href="/favicon-192.png" />
|
<link rel="icon" sizes="192x192" href="/favicon-192.png" />
|
||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
<link rel="shortcut icon" href="/favicon.ico?v=2" />
|
||||||
<meta name="emotion-insertion-point" content="" />
|
<meta name="emotion-insertion-point" content="" />
|
||||||
${!opts ? '<meta name="robots" content="noindex, nofollow" />' : ''}
|
${!opts ? '<meta name="robots" content="noindex, nofollow" />' : ''}
|
||||||
<meta
|
<meta
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ export class WorkerController {
|
|||||||
// fix favicon
|
// fix favicon
|
||||||
{
|
{
|
||||||
// head default path of favicon
|
// head default path of favicon
|
||||||
const faviconUrl = new URL('/favicon.ico', response.url);
|
const faviconUrl = new URL('/favicon.ico?v=2', response.url);
|
||||||
const faviconResponse = await fetch(faviconUrl, { method: 'HEAD' });
|
const faviconResponse = await fetch(faviconUrl, { method: 'HEAD' });
|
||||||
if (faviconResponse.ok) {
|
if (faviconResponse.ok) {
|
||||||
appendUrl(faviconUrl.toString(), res.favicons);
|
appendUrl(faviconUrl.toString(), res.favicons);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 15 KiB |
@@ -20,7 +20,7 @@
|
|||||||
<link rel="manifest" href="/manifest.json" />
|
<link rel="manifest" href="/manifest.json" />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||||
<link rel="icon" sizes="192x192" href="/favicon-192.png" />
|
<link rel="icon" sizes="192x192" href="/favicon-192.png" />
|
||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
<link rel="shortcut icon" href="/favicon.ico?v=2" />
|
||||||
<meta name="emotion-insertion-point" content="" />
|
<meta name="emotion-insertion-point" content="" />
|
||||||
<meta property="description" content="<%= DESCRIPTION %>" />
|
<meta property="description" content="<%= DESCRIPTION %>" />
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
|||||||
Reference in New Issue
Block a user