Skip to content

Commit 92df955

Browse files
committed
feat: implement thumbnail generation from astro hooks
1 parent b4b57aa commit 92df955

File tree

10 files changed

+749
-343
lines changed

10 files changed

+749
-343
lines changed

astro.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ import {
2424
default as remarkReadMoreDirective,
2525
} from "./src/lib/plugins/read-more/remark-directive";
2626
import sitemap from "@astrojs/sitemap";
27+
import { buildDocIntegration } from "./src/hooks/build-doc";
2728

2829
export default defineConfig({
2930
site: "https://example.com",
3031
output: "static",
3132
prefetch: true,
32-
integrations: [react(), mdx(), icon(), sitemap()],
33+
integrations: [react(), mdx(), icon(), buildDocIntegration(), sitemap()],
3334

3435
markdown: {
3536
shikiConfig: {
@@ -71,6 +72,9 @@ export default defineConfig({
7172
},
7273

7374
vite: {
75+
build: {
76+
chunkSizeWarningLimit: 2000,
77+
},
7478
plugins: [tailwindcss()],
7579
},
7680
});

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"astro": "astro"
1010
},
1111
"dependencies": {
12-
"@astrojs/mdx": "^4.2.2",
13-
"@astrojs/react": "^4.2.2",
12+
"@astrojs/mdx": "^4.3.12",
13+
"@astrojs/react": "^4.4.2",
1414
"@astrojs/sitemap": "^3.6.0",
1515
"@expressive-code/plugin-line-numbers": "^0.40.2",
1616
"@iconify-json/devicon": "^1.2.23",
@@ -21,20 +21,24 @@
2121
"@radix-ui/react-dropdown-menu": "^2.1.15",
2222
"@radix-ui/react-navigation-menu": "^1.2.5",
2323
"@radix-ui/react-slot": "^1.2.3",
24+
"@resvg/resvg-js": "^2.6.2",
2425
"@scalar/api-reference-react": "^0.6.19",
2526
"@tailwindcss/vite": "^4.0.17",
27+
"@types/culori": "^4.0.1",
2628
"@types/hast": "^3.0.4",
2729
"@types/luxon": "^3.6.2",
2830
"@types/mdast": "^4.0.4",
2931
"@types/node": "^24.10.0",
3032
"@types/react": "^19.0.12",
3133
"@types/react-dom": "^19.0.4",
32-
"astro": "^5.5.5",
34+
"astro": "^5.16.3",
3335
"astro-icon": "^1.1.5",
3436
"autoprefixer": "^10.4.21",
3537
"class-variance-authority": "^0.7.1",
3638
"clsx": "^2.1.1",
3739
"cmdk": "^1.1.1",
40+
"culori": "^4.0.2",
41+
"gray-matter": "^4.0.3",
3842
"hast": "^1.0.0",
3943
"hast-util-to-html": "^9.0.5",
4044
"hastscript": "^9.0.1",

0 commit comments

Comments
 (0)