Skip to content

Commit 7978c4d

Browse files
committed
support excalidraw
1 parent 3612cdc commit 7978c4d

10 files changed

Lines changed: 1436 additions & 1030 deletions

File tree

astro.config.mjs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import rehypeAutolinkHeadings from './src/plugins/rehype-auto-link-headings.ts';
2020
// import { addCopyButton, addLanguage, addTitle, transformerNotationDiff, transformerNotationHighlight, updateStyle } from './src/plugins/shiki-transformers.ts';
2121
import config from './src/site.config.ts';
2222

23+
import react from '@astrojs/react';
24+
2325
// https://astro.build/config
2426
export default defineConfig({
2527
// Top-Level Options
@@ -68,10 +70,11 @@ export default defineConfig({
6870
devicon: ['*'],
6971
mingcute: ['*']
7072
}
71-
}),
72-
AstroPureIntegration(config),
73-
fontSubsetting() // 构建后自动运行字体子集化
74-
],
73+
}),
74+
AstroPureIntegration(config),
75+
fontSubsetting(),
76+
react()
77+
],
7578
// root: './my-project-directory',
7679

7780
// Prefetch Options
@@ -143,6 +146,17 @@ export default defineConfig({
143146
contentIntellisense: true
144147
},
145148
vite: {
149+
ssr: {
150+
noExternal: ['@excalidraw/excalidraw', 'roughjs', 'clsx'],
151+
},
152+
resolve: {
153+
alias: {
154+
'roughjs/bin/rough': 'roughjs/bin/rough.js',
155+
},
156+
},
157+
optimizeDeps: {
158+
include: ['@excalidraw/excalidraw', 'roughjs', 'clsx'],
159+
},
146160
plugins: [
147161
// visualizer({
148162
// emitFile: true,

bun.lock

Lines changed: 398 additions & 975 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,30 @@
2222
},
2323
"dependencies": {
2424
"@astrojs/check": "^0.9.4",
25+
"@astrojs/react": "^4.4.2",
2526
"@astrojs/rss": "^4.0.12",
2627
"@astrojs/vercel": "8.2.2",
2728
"@braindb/remark-wiki-link": "^2.1.0",
29+
"@excalidraw/excalidraw": "^0.18.0",
2830
"@expressive-code/plugin-collapsible-sections": "^0.41.3",
2931
"@expressive-code/plugin-line-numbers": "^0.41.3",
3032
"@iconify-json/devicon": "^1.2.20",
31-
"@playform/compress": "^0.2.0",
32-
"@rive-app/canvas": "2.19.8",
33+
"@types/react": "^19.2.7",
34+
"@types/react-dom": "^19.2.3",
3335
"@unocss/preset-wind3": "^66.0.0",
3436
"@unocss/reset": "^66.0.0",
3537
"@waline/client": "^3.6.0",
3638
"@xt0rted/expressive-code-file-icons": "^1.0.0",
3739
"astro": "5.5.3",
3840
"astro-expressive-code": "^0.41.3",
3941
"astro-icon": "^1.1.5",
40-
"astro-lightgallery": "^2.0.1",
4142
"astro-mermaid": "^1.1.0",
4243
"astro-pure": "1.3.1",
43-
"edgeone": "^1.1.20",
4444
"katex": "^0.16.22",
45+
"lz-string": "^1.5.0",
4546
"mermaid": "^11.12.1",
47+
"react": "^19.2.3",
48+
"react-dom": "^19.2.3",
4649
"rehype-katex": "^7.0.1",
4750
"remark-breaks": "^4.0.0",
4851
"remark-math": "^6.0.0",

public/excalidraw/ob-e-m.md

Lines changed: 326 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)