Skip to content

Commit b8c11e5

Browse files
committed
feat: generate og with satori/sharp
1 parent 37c5b78 commit b8c11e5

File tree

8 files changed

+673
-14
lines changed

8 files changed

+673
-14
lines changed

2025/astro.config.mjs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,31 @@
22
import { defineConfig } from 'astro/config';
33
import Macros from 'unplugin-macros/vite'
44

5+
import react from '@astrojs/react';
6+
57
// https://astro.build/config
68
export default defineConfig({
79
base: '/2025',
10+
811
experimental: {
912
serializeConfig: true,
1013
},
14+
1115
redirects: {
1216
'/': '/2025/ja',
1317
'/2025': '/2025/ja',
1418
},
19+
1520
vite:{
21+
optimizeDeps: {
22+
exclude: [
23+
'@resvg/resvg-js'
24+
]
25+
},
1626
plugins: [
1727
Macros()
1828
]
19-
}
20-
});
29+
},
30+
31+
integrations: [react()]
32+
});

2025/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@
1010
"astro": "astro"
1111
},
1212
"dependencies": {
13+
"@astrojs/react": "^4.2.0",
14+
"@types/react": "^19.0.8",
15+
"@types/react-dom": "^19.0.3",
1316
"astro": "^5.2.5",
1417
"astro-google-fonts-optimizer": "^0.2.2",
1518
"astro-seo": "^0.8.4",
19+
"react": "^19.0.0",
20+
"react-dom": "^19.0.0",
21+
"satori": "^0.12.1",
1622
"ufo": "^1.5.4"
1723
},
1824
"devDependencies": {
1925
"@astrojs/ts-plugin": "^1.10.4",
2026
"astro-og-image": "^1.0.7",
27+
"sharp": "^0.33.5",
2128
"typescript": "^5.7.3",
2229
"unplugin-macros": "^0.16.0"
2330
},

0 commit comments

Comments
 (0)