Skip to content

Commit 1d33e2e

Browse files
committed
format
1 parent 3967d6b commit 1d33e2e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/gitbook/src/routes/icon.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ export async function serveIcon(context: GitBookSiteContext, req: Request) {
3030
const options = getOptions(req.url);
3131
const size = SIZES[options.size];
3232

33-
34-
3533
const { site, customization } = context;
3634
const customIcon = 'icon' in customization.favicon ? customization.favicon.icon : null;
3735

38-
console.log('icon: serveIcon', req.url, customIcon ? 'custom' : 'emoji' in customization.favicon ? 'emoji' : 'fallback');
36+
console.log(
37+
'icon: serveIcon',
38+
req.url,
39+
customIcon ? 'custom' : 'emoji' in customization.favicon ? 'emoji' : 'fallback'
40+
);
3941
// If the site has a custom icon, redirect to it
4042
if (customIcon) {
4143
const iconUrl = options.theme === 'light' ? customIcon.light : customIcon.dark;
@@ -50,8 +52,8 @@ export async function serveIcon(context: GitBookSiteContext, req: Request) {
5052
const contentTitle = site.title;
5153

5254
// Load the font locally to prevent the shared instance used by ImageResponse.
53-
const font = await fetch(new URL('../fonts/Inter/Inter-Regular.ttf', import.meta.url)).then((res) =>
54-
res.arrayBuffer()
55+
const font = await fetch(new URL('../fonts/Inter/Inter-Regular.ttf', import.meta.url)).then(
56+
(res) => res.arrayBuffer()
5557
);
5658

5759
return new ImageResponse(
@@ -88,8 +90,8 @@ export async function serveIcon(context: GitBookSiteContext, req: Request) {
8890
name: 'Inter',
8991
weight: 400,
9092
style: 'normal',
91-
}
92-
]
93+
},
94+
],
9395
}
9496
);
9597
}

0 commit comments

Comments
 (0)