Skip to content

Commit 47bf404

Browse files
authored
fix: add favicon link tags to _document.tsx for social media crawlers (#1242)
1 parent 6a96f6d commit 47bf404

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

pages/_document.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { JSX } from "react";
21
import Document, { Head, Html, Main, NextScript } from "next/document";
2+
import { JSX } from "react";
33

44
const siteConfig = process.env.NEXT_PUBLIC_SITE_CONFIG;
55
const plausibleDomain = process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN;
@@ -22,6 +22,24 @@ class MyDocument extends Document {
2222
return (
2323
<Html>
2424
<Head>
25+
<link rel="icon" type="image/x-icon" href="/favicons/favicon.ico" />
26+
<link
27+
rel="icon"
28+
type="image/png"
29+
sizes="16x16"
30+
href="/favicons/favicon-16x16.png"
31+
/>
32+
<link
33+
rel="icon"
34+
type="image/png"
35+
sizes="32x32"
36+
href="/favicons/favicon-32x32.png"
37+
/>
38+
<link
39+
rel="apple-touch-icon"
40+
sizes="180x180"
41+
href="/favicons/apple-touch-icon.png"
42+
/>
2543
<link
2644
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Roboto+Mono&display=swap"
2745
rel="stylesheet"

0 commit comments

Comments
 (0)