Skip to content

Commit 42cdbd0

Browse files
committed
feat: progress on the article and added GH style admonitions support
1 parent eb9bd85 commit 42cdbd0

File tree

7 files changed

+992
-128
lines changed

7 files changed

+992
-128
lines changed

astro.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import tailwindcss from '@tailwindcss/vite'
66
import { defineConfig, fontProviders } from 'astro/config'
77
import expressiveCode from 'astro-expressive-code'
88
import partytown from '@astrojs/partytown'
9+
import remarkDirective from 'remark-directive' /* Handle ::: directives as nodes */
10+
import { remarkAdmonitions } from './src/plugins/remark-admonitions' /* Add admonitions */
911

1012
// https://astro.build/config
1113
export default defineConfig({
@@ -16,6 +18,9 @@ export default defineConfig({
1618
sitemap(),
1719
partytown({ config: { forward: ['dataLayer.push'] } }),
1820
],
21+
markdown: {
22+
remarkPlugins: [remarkDirective, remarkAdmonitions],
23+
},
1924
vite: {
2025
plugins: [tailwindcss()],
2126
},

package.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,33 @@
3030
"clsx": "^2.1.1",
3131
"daisyui": "^5.0.43",
3232
"framer-motion": "^12.15.0",
33+
"hastscript": "^9.0.1",
3334
"lucide-react": "^0.511.0",
35+
"mdast": "^3.0.0",
36+
"mdast-util-directive": "^3.1.0",
37+
"mdast-util-to-markdown": "^2.1.2",
38+
"mdast-util-to-string": "^4.0.0",
3439
"ogl": "^1.0.11",
3540
"react": "^19.1.0",
3641
"react-dom": "^19.1.0",
3742
"rehype-accessible-emojis": "^0.3.2",
43+
"remark-directive": "^4.0.0",
3844
"remark-toc": "^9.0.0",
3945
"sharp": "^0.34.3",
4046
"swiper": "^11.2.10",
4147
"tailwind-merge": "^3.3.0",
4248
"tailwindcss": "^4.1.8",
43-
"three": "^0.180.0"
49+
"three": "^0.180.0",
50+
"unified": "^11.0.5",
51+
"unist-util-visit": "^5.0.0"
4452
},
4553
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
4654
"devDependencies": {
47-
"@eslint/js": "9.35.0",
48-
"@types/three": "^0.180.0",
55+
"@eslint/js": "latest",
56+
"@types/mdast": "^4.0.4",
57+
"@types/three": "latest",
4958
"@typescript-eslint/eslint-plugin": "8.37.0",
50-
"@typescript-eslint/parser": "8.43.0",
59+
"@typescript-eslint/parser": "latest",
5160
"astro-eslint-parser": "1.2.2",
5261
"eslint": "9.35.0",
5362
"eslint-config-prettier": "10.1.8",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)