-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.ts
37 lines (35 loc) · 1.01 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { readFileSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'node:path'
import { defineSatoriConfig } from 'x-satori/vue'
const _DIRNAME = typeof __dirname !== 'undefined'
? __dirname
: dirname(fileURLToPath(import.meta.url))
export default defineSatoriConfig({
height: 628,
width: 1200,
fonts: [
{
name: 'Inter',
data: readFileSync(resolve(_DIRNAME, './fonts/Inter-Medium.woff')),
weight: 400,
style: 'normal',
},
{
name: 'Inter',
data: readFileSync(resolve(_DIRNAME, './fonts/Inter-Bold.woff')),
weight: 700,
style: 'normal',
},
{
name: 'Noto Sans Symbols',
data: readFileSync(resolve(_DIRNAME, './fonts/NotoSansSymbols2-Regular.ttf')),
weight: 700,
style: 'normal',
},
],
props: {
title: 'Hello World',
site: 'https://qbb.sh',
},
})