Skip to content

Commit a0cf8bb

Browse files
authored
Feat/files blog post (#25)
* feat: Blog post on reading and writing files * feat: progress on the article and added GH style admonitions support * feat: more progress on the article * feat: more progress on the article * chore: more progress on article * feat: Completed article * chore: make prettier pretty and happy
1 parent 62f9c45 commit a0cf8bb

File tree

8 files changed

+1526
-14
lines changed

8 files changed

+1526
-14
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
},

ec.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-sections'
2+
13
const config = {
24
themes: ['material-theme-ocean', 'min-light'],
35
themeCssSelector(theme) {
46
return `[data-code-theme='${theme.name}']`
57
},
8+
plugins: [pluginCollapsibleSections({})],
69
useDarkModeMediaQuery: false,
710
}
811

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@astrojs/partytown": "^2.1.4",
1818
"@astrojs/react": "^4.3.1",
1919
"@astrojs/sitemap": "^3.6.0",
20+
"@expressive-code/plugin-collapsible-sections": "^0.41.3",
2021
"@lucide/astro": "^0.522.0",
2122
"@radix-ui/react-slot": "^1.2.3",
2223
"@tailwindcss/typography": "^0.5.16",
@@ -30,24 +31,33 @@
3031
"clsx": "^2.1.1",
3132
"daisyui": "^5.0.43",
3233
"framer-motion": "^12.15.0",
34+
"hastscript": "^9.0.1",
3335
"lucide-react": "^0.511.0",
36+
"mdast": "^3.0.0",
37+
"mdast-util-directive": "^3.1.0",
38+
"mdast-util-to-markdown": "^2.1.2",
39+
"mdast-util-to-string": "^4.0.0",
3440
"ogl": "^1.0.11",
3541
"react": "^19.1.0",
3642
"react-dom": "^19.1.0",
3743
"rehype-accessible-emojis": "^0.3.2",
44+
"remark-directive": "^4.0.0",
3845
"remark-toc": "^9.0.0",
3946
"sharp": "^0.34.3",
4047
"swiper": "^11.2.10",
4148
"tailwind-merge": "^3.3.0",
4249
"tailwindcss": "^4.1.8",
43-
"three": "^0.180.0"
50+
"three": "^0.180.0",
51+
"unified": "^11.0.5",
52+
"unist-util-visit": "^5.0.0"
4453
},
4554
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
4655
"devDependencies": {
47-
"@eslint/js": "9.35.0",
48-
"@types/three": "^0.180.0",
56+
"@eslint/js": "latest",
57+
"@types/mdast": "^4.0.4",
58+
"@types/three": "latest",
4959
"@typescript-eslint/eslint-plugin": "8.37.0",
50-
"@typescript-eslint/parser": "8.43.0",
60+
"@typescript-eslint/parser": "latest",
5161
"astro-eslint-parser": "1.2.2",
5262
"eslint": "9.35.0",
5363
"eslint-config-prettier": "10.1.8",

pnpm-lock.yaml

Lines changed: 134 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)