-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.ts
39 lines (37 loc) · 1.06 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
38
39
import { readFile } from 'node:fs/promises'
import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'node:path'
import { defineSatoriConfig } from 'x-satori/vue'
const _FONT_DIR = resolve(dirname(
fileURLToPath(import.meta.url),
), '../../public/fonts')
export default defineSatoriConfig({
height: 628,
width: 1200,
props: {
// default
title: 'VitePress',
desc: 'Markdown to Beautiful Docs in Minutes',
site: 'https://vitepress.dev',
},
fonts: [
{
name: 'Inter',
data: await readFile(resolve(_FONT_DIR, './Inter-Medium.woff')),
weight: 400,
style: 'normal',
},
{
name: 'Inter',
data: await readFile(resolve(_FONT_DIR, './Inter-Bold.woff')),
weight: 700,
style: 'normal',
},
{
name: 'Noto Sans Symbols',
data: await readFile(resolve(_FONT_DIR, './NotoSansSymbols2-Regular.ttf')),
weight: 700,
style: 'normal',
},
],
})