refactor: enhance blog post display and MDX integration

This commit is contained in:
Guoqi Sun 2024-12-12 01:30:54 +08:00
parent b2f3ec355a
commit 67ba797a55
22 changed files with 602 additions and 94 deletions

View file

@ -2,7 +2,8 @@
"recommendations": [ "recommendations": [
"astro-build.astro-vscode", "astro-build.astro-vscode",
"esbenp.prettier-vscode", "esbenp.prettier-vscode",
"dbaeumer.vscode-eslint" "dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx"
], ],
"unwantedRecommendations": [] "unwantedRecommendations": []
} }

View file

@ -1,2 +1 @@
# todo
inspired by [wordpress-dear](https://github.com/imjeff/wordpress-dear)

View file

@ -5,8 +5,10 @@ import react from "@astrojs/react"
import tailwind from "@astrojs/tailwind" import tailwind from "@astrojs/tailwind"
import { defineConfig } from "astro/config" import { defineConfig } from "astro/config"
import mdx from "@astrojs/mdx";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
integrations: [react(), tailwind()], integrations: [react(), tailwind(), mdx()],
adapter: process.env.NODE_ENV === "production" ? netlify() : undefined, adapter: process.env.NODE_ENV === "production" ? netlify() : undefined,
}) })

View file

@ -12,6 +12,7 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.4", "@astrojs/check": "^0.9.4",
"@astrojs/mdx": "^4.0.2",
"@astrojs/netlify": "^6.0.0", "@astrojs/netlify": "^6.0.0",
"@astrojs/react": "^4.1.0", "@astrojs/react": "^4.1.0",
"@astrojs/rss": "^4.0.10", "@astrojs/rss": "^4.0.10",

515
pnpm-lock.yaml generated
View file

@ -11,6 +11,9 @@ importers:
'@astrojs/check': '@astrojs/check':
specifier: ^0.9.4 specifier: ^0.9.4
version: 0.9.4(prettier-plugin-astro@0.14.1)(prettier@3.4.0)(typescript@5.7.2) version: 0.9.4(prettier-plugin-astro@0.14.1)(prettier@3.4.0)(typescript@5.7.2)
'@astrojs/mdx':
specifier: ^4.0.2
version: 4.0.2(astro@5.0.5(@types/node@22.10.2)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))
'@astrojs/netlify': '@astrojs/netlify':
specifier: ^6.0.0 specifier: ^6.0.0
version: 6.0.0(@types/node@22.10.2)(astro@5.0.5(@types/node@22.10.2)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))(jiti@1.21.6)(yaml@2.6.1) version: 6.0.0(@types/node@22.10.2)(astro@5.0.5(@types/node@22.10.2)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))(jiti@1.21.6)(yaml@2.6.1)
@ -131,6 +134,12 @@ packages:
'@astrojs/markdown-remark@6.0.1': '@astrojs/markdown-remark@6.0.1':
resolution: {integrity: sha512-CTSYijj25NfxgZi15TU3CwPwgyD1/7yA3FcdcNmB9p94nydupiUbrIiq3IqeTp2m5kCVzxbPZeC7fTwEOaNyGw==} resolution: {integrity: sha512-CTSYijj25NfxgZi15TU3CwPwgyD1/7yA3FcdcNmB9p94nydupiUbrIiq3IqeTp2m5kCVzxbPZeC7fTwEOaNyGw==}
'@astrojs/mdx@4.0.2':
resolution: {integrity: sha512-uBoXNSSAUqhf2dVtJWFbSapwNkcnCzbISW98EcybFXvNgYt9g8yPJ7+lYnf+sH5pv0c/JEW8HlBvPSi81AVRlw==}
engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0}
peerDependencies:
astro: ^5.0.0
'@astrojs/netlify@6.0.0': '@astrojs/netlify@6.0.0':
resolution: {integrity: sha512-r0Z8A0Sg8g2QsM6veoJ7/UkibXuLJviLZ9TblaEKrvfcyx2O+D5ejHthaAK7kkRb6/Guw7bPxoxfbt6gvM4g/A==} resolution: {integrity: sha512-r0Z8A0Sg8g2QsM6veoJ7/UkibXuLJviLZ9TblaEKrvfcyx2O+D5ejHthaAK7kkRb6/Guw7bPxoxfbt6gvM4g/A==}
peerDependencies: peerDependencies:
@ -750,6 +759,9 @@ packages:
resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==}
hasBin: true hasBin: true
'@mdx-js/mdx@3.1.0':
resolution: {integrity: sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==}
'@netlify/functions@2.8.2': '@netlify/functions@2.8.2':
resolution: {integrity: sha512-DeoAQh8LuNPvBE4qsKlezjKj0PyXDryOFJfJKo3Z1qZLKzQ21sT314KQKPVjfvw6knqijj+IO+0kHXy/TJiqNA==} resolution: {integrity: sha512-DeoAQh8LuNPvBE4qsKlezjKj0PyXDryOFJfJKo3Z1qZLKzQ21sT314KQKPVjfvw6knqijj+IO+0kHXy/TJiqNA==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
@ -917,6 +929,9 @@ packages:
peerDependencies: peerDependencies:
tailwindcss: '>=3.0.0 || insiders || >=4.0.0-alpha.20' tailwindcss: '>=3.0.0 || insiders || >=4.0.0-alpha.20'
'@types/acorn@4.0.6':
resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==}
'@types/babel__core@7.20.5': '@types/babel__core@7.20.5':
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
@ -938,6 +953,9 @@ packages:
'@types/dom-view-transitions@1.0.5': '@types/dom-view-transitions@1.0.5':
resolution: {integrity: sha512-N2sILR7fxSMnaFaAPwGj4DtHCXjIyQTHt+xJyf9jATpzUsTkMNM0DWtqZB6W7f501B/Y0tq3uqat/VlbjuTpMA==} resolution: {integrity: sha512-N2sILR7fxSMnaFaAPwGj4DtHCXjIyQTHt+xJyf9jATpzUsTkMNM0DWtqZB6W7f501B/Y0tq3uqat/VlbjuTpMA==}
'@types/estree-jsx@1.0.5':
resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==}
'@types/estree@1.0.6': '@types/estree@1.0.6':
resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
@ -950,6 +968,9 @@ packages:
'@types/mdast@4.0.4': '@types/mdast@4.0.4':
resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==}
'@types/mdx@2.0.13':
resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==}
'@types/ms@0.7.34': '@types/ms@0.7.34':
resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==}
@ -971,6 +992,9 @@ packages:
'@types/sanitize-html@2.13.0': '@types/sanitize-html@2.13.0':
resolution: {integrity: sha512-X31WxbvW9TjIhZZNyNBZ/p5ax4ti7qsNDBDEnH4zAgmEh35YnFD1UiS6z9Cd34kKm0LslFW0KPmTQzu/oGtsqQ==} resolution: {integrity: sha512-X31WxbvW9TjIhZZNyNBZ/p5ax4ti7qsNDBDEnH4zAgmEh35YnFD1UiS6z9Cd34kKm0LslFW0KPmTQzu/oGtsqQ==}
'@types/unist@2.0.11':
resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==}
'@types/unist@3.0.3': '@types/unist@3.0.3':
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
@ -1169,6 +1193,10 @@ packages:
ast-types-flow@0.0.8: ast-types-flow@0.0.8:
resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==}
astring@1.9.0:
resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==}
hasBin: true
astro-eslint-parser@1.1.0: astro-eslint-parser@1.1.0:
resolution: {integrity: sha512-F6NW1RJo5pp2kPnnM97M5Ohw8zAGjv83MpxHqfAochH68n/kiXN57+hYaNUCA7XkScoVNr6yzvly3hsY34TGfQ==} resolution: {integrity: sha512-F6NW1RJo5pp2kPnnM97M5Ohw8zAGjv83MpxHqfAochH68n/kiXN57+hYaNUCA7XkScoVNr6yzvly3hsY34TGfQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1280,6 +1308,9 @@ packages:
character-entities@2.0.2: character-entities@2.0.2:
resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==}
character-reference-invalid@2.0.1:
resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==}
chokidar@3.6.0: chokidar@3.6.0:
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
engines: {node: '>= 8.10.0'} engines: {node: '>= 8.10.0'}
@ -1316,6 +1347,9 @@ packages:
resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}
engines: {node: '>=6'} engines: {node: '>=6'}
collapse-white-space@2.1.0:
resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==}
color-convert@2.0.1: color-convert@2.0.1:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'} engines: {node: '>=7.0.0'}
@ -1538,6 +1572,12 @@ packages:
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
esast-util-from-estree@2.0.0:
resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==}
esast-util-from-js@2.0.1:
resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==}
esbuild@0.21.5: esbuild@0.21.5:
resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}
engines: {node: '>=12'} engines: {node: '>=12'}
@ -1621,6 +1661,24 @@ packages:
resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
engines: {node: '>=4.0'} engines: {node: '>=4.0'}
estree-util-attach-comments@3.0.0:
resolution: {integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==}
estree-util-build-jsx@3.0.1:
resolution: {integrity: sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==}
estree-util-is-identifier-name@3.0.0:
resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==}
estree-util-scope@1.0.0:
resolution: {integrity: sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==}
estree-util-to-js@2.0.0:
resolution: {integrity: sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==}
estree-util-visit@2.0.0:
resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==}
estree-walker@2.0.2: estree-walker@2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
@ -1851,9 +1909,15 @@ packages:
hast-util-raw@9.1.0: hast-util-raw@9.1.0:
resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==} resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==}
hast-util-to-estree@3.1.0:
resolution: {integrity: sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==}
hast-util-to-html@9.0.3: hast-util-to-html@9.0.3:
resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==}
hast-util-to-jsx-runtime@2.3.2:
resolution: {integrity: sha512-1ngXYb+V9UT5h+PxNRa1O1FYguZK/XL+gkeqvp7EdHlB9oHUG0eYRo/vY5inBdcqo3RkPMC58/H94HvkbfGdyg==}
hast-util-to-parse5@8.0.0: hast-util-to-parse5@8.0.0:
resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==}
@ -1913,10 +1977,22 @@ packages:
inherits@2.0.4: inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
inline-style-parser@0.1.1:
resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==}
inline-style-parser@0.2.4:
resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==}
internal-slot@1.0.7: internal-slot@1.0.7:
resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
is-alphabetical@2.0.1:
resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==}
is-alphanumerical@2.0.1:
resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==}
is-array-buffer@3.0.4: is-array-buffer@3.0.4:
resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
@ -1955,6 +2031,9 @@ packages:
resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
is-decimal@2.0.1:
resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==}
is-docker@3.0.0: is-docker@3.0.0:
resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@ -1988,6 +2067,9 @@ packages:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
is-hexadecimal@2.0.1:
resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==}
is-inside-container@1.0.0: is-inside-container@1.0.0:
resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==}
engines: {node: '>=14.16'} engines: {node: '>=14.16'}
@ -2210,6 +2292,10 @@ packages:
resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==}
engines: {node: '>=8'} engines: {node: '>=8'}
markdown-extensions@2.0.0:
resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==}
engines: {node: '>=16'}
markdown-table@3.0.4: markdown-table@3.0.4:
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
@ -2240,6 +2326,18 @@ packages:
mdast-util-gfm@3.0.0: mdast-util-gfm@3.0.0:
resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==} resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==}
mdast-util-mdx-expression@2.0.1:
resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==}
mdast-util-mdx-jsx@3.1.3:
resolution: {integrity: sha512-bfOjvNt+1AcbPLTFMFWY149nJz0OjmewJs3LQQ5pIyVGxP4CdOqNVJL6kTaM5c68p8q82Xv3nCyFfUnuEcH3UQ==}
mdast-util-mdx@3.0.0:
resolution: {integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==}
mdast-util-mdxjs-esm@2.0.1:
resolution: {integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==}
mdast-util-phrasing@4.1.0: mdast-util-phrasing@4.1.0:
resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==}
@ -2283,12 +2381,30 @@ packages:
micromark-extension-gfm@3.0.0: micromark-extension-gfm@3.0.0:
resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==} resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==}
micromark-extension-mdx-expression@3.0.0:
resolution: {integrity: sha512-sI0nwhUDz97xyzqJAbHQhp5TfaxEvZZZ2JDqUo+7NvyIYG6BZ5CPPqj2ogUoPJlmXHBnyZUzISg9+oUmU6tUjQ==}
micromark-extension-mdx-jsx@3.0.1:
resolution: {integrity: sha512-vNuFb9czP8QCtAQcEJn0UJQJZA8Dk6DXKBqx+bg/w0WGuSxDxNr7hErW89tHUY31dUW4NqEOWwmEUNhjTFmHkg==}
micromark-extension-mdx-md@2.0.0:
resolution: {integrity: sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==}
micromark-extension-mdxjs-esm@3.0.0:
resolution: {integrity: sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==}
micromark-extension-mdxjs@3.0.0:
resolution: {integrity: sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==}
micromark-factory-destination@2.0.1: micromark-factory-destination@2.0.1:
resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==}
micromark-factory-label@2.0.1: micromark-factory-label@2.0.1:
resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==}
micromark-factory-mdx-expression@2.0.2:
resolution: {integrity: sha512-5E5I2pFzJyg2CtemqAbcyCktpHXuJbABnsb32wX2U8IQKhhVFBqkcZR5LRm1WVoFqa4kTueZK4abep7wdo9nrw==}
micromark-factory-space@2.0.1: micromark-factory-space@2.0.1:
resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==} resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==}
@ -2319,6 +2435,9 @@ packages:
micromark-util-encode@2.0.1: micromark-util-encode@2.0.1:
resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==}
micromark-util-events-to-acorn@2.0.2:
resolution: {integrity: sha512-Fk+xmBrOv9QZnEDguL9OI9/NQQp6Hz4FuQ4YmCb/5V7+9eAh1s6AYSvL20kHkD67YIg7EpE54TiSlcsf3vyZgA==}
micromark-util-html-tag-name@2.0.1: micromark-util-html-tag-name@2.0.1:
resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==}
@ -2533,6 +2652,9 @@ packages:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'} engines: {node: '>=6'}
parse-entities@4.0.1:
resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==}
parse-latin@7.0.0: parse-latin@7.0.0:
resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==} resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==}
@ -2780,6 +2902,18 @@ packages:
resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==}
engines: {node: '>= 14.16.0'} engines: {node: '>= 14.16.0'}
recma-build-jsx@1.0.0:
resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==}
recma-jsx@1.0.0:
resolution: {integrity: sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q==}
recma-parse@1.0.0:
resolution: {integrity: sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==}
recma-stringify@1.0.0:
resolution: {integrity: sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==}
reflect.getprototypeof@1.0.7: reflect.getprototypeof@1.0.7:
resolution: {integrity: sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g==} resolution: {integrity: sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
@ -2803,6 +2937,9 @@ packages:
rehype-raw@7.0.0: rehype-raw@7.0.0:
resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==}
rehype-recma@1.0.0:
resolution: {integrity: sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==}
rehype-stringify@10.0.1: rehype-stringify@10.0.1:
resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==} resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==}
@ -2812,6 +2949,9 @@ packages:
remark-gfm@4.0.0: remark-gfm@4.0.0:
resolution: {integrity: sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==} resolution: {integrity: sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==}
remark-mdx@3.1.0:
resolution: {integrity: sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA==}
remark-parse@11.0.0: remark-parse@11.0.0:
resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==}
@ -2978,6 +3118,10 @@ packages:
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
source-map@0.7.4:
resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==}
engines: {node: '>= 8'}
space-separated-tokens@2.0.2: space-separated-tokens@2.0.2:
resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
@ -3044,6 +3188,12 @@ packages:
strnum@1.0.5: strnum@1.0.5:
resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==}
style-to-object@0.4.4:
resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==}
style-to-object@1.0.8:
resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==}
sucrase@3.35.0: sucrase@3.35.0:
resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==}
engines: {node: '>=16 || 14 >=14.17'} engines: {node: '>=16 || 14 >=14.17'}
@ -3174,6 +3324,9 @@ packages:
unist-util-modify-children@4.0.0: unist-util-modify-children@4.0.0:
resolution: {integrity: sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw==} resolution: {integrity: sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw==}
unist-util-position-from-estree@2.0.0:
resolution: {integrity: sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==}
unist-util-position@5.0.0: unist-util-position@5.0.0:
resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==}
@ -3616,6 +3769,25 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@astrojs/mdx@4.0.2(astro@5.0.5(@types/node@22.10.2)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))':
dependencies:
'@astrojs/markdown-remark': 6.0.1
'@mdx-js/mdx': 3.1.0(acorn@8.14.0)
acorn: 8.14.0
astro: 5.0.5(@types/node@22.10.2)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1)
es-module-lexer: 1.5.4
estree-util-visit: 2.0.0
hast-util-to-html: 9.0.3
kleur: 4.1.5
rehype-raw: 7.0.0
remark-gfm: 4.0.0
remark-smartypants: 3.0.2
source-map: 0.7.4
unist-util-visit: 5.0.0
vfile: 6.0.3
transitivePeerDependencies:
- supports-color
'@astrojs/netlify@6.0.0(@types/node@22.10.2)(astro@5.0.5(@types/node@22.10.2)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))(jiti@1.21.6)(yaml@2.6.1)': '@astrojs/netlify@6.0.0(@types/node@22.10.2)(astro@5.0.5(@types/node@22.10.2)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))(jiti@1.21.6)(yaml@2.6.1)':
dependencies: dependencies:
'@astrojs/internal-helpers': 0.4.1 '@astrojs/internal-helpers': 0.4.1
@ -4147,6 +4319,36 @@ snapshots:
- encoding - encoding
- supports-color - supports-color
'@mdx-js/mdx@3.1.0(acorn@8.14.0)':
dependencies:
'@types/estree': 1.0.6
'@types/estree-jsx': 1.0.5
'@types/hast': 3.0.4
'@types/mdx': 2.0.13
collapse-white-space: 2.1.0
devlop: 1.1.0
estree-util-is-identifier-name: 3.0.0
estree-util-scope: 1.0.0
estree-walker: 3.0.3
hast-util-to-jsx-runtime: 2.3.2
markdown-extensions: 2.0.0
recma-build-jsx: 1.0.0
recma-jsx: 1.0.0(acorn@8.14.0)
recma-stringify: 1.0.0
rehype-recma: 1.0.0
remark-mdx: 3.1.0
remark-parse: 11.0.0
remark-rehype: 11.1.1
source-map: 0.7.4
unified: 11.0.5
unist-util-position-from-estree: 2.0.0
unist-util-stringify-position: 4.0.0
unist-util-visit: 5.0.0
vfile: 6.0.3
transitivePeerDependencies:
- acorn
- supports-color
'@netlify/functions@2.8.2': '@netlify/functions@2.8.2':
dependencies: dependencies:
'@netlify/serverless-functions-api': 1.26.1 '@netlify/serverless-functions-api': 1.26.1
@ -4279,6 +4481,10 @@ snapshots:
postcss-selector-parser: 6.0.10 postcss-selector-parser: 6.0.10
tailwindcss: 3.4.16 tailwindcss: 3.4.16
'@types/acorn@4.0.6':
dependencies:
'@types/estree': 1.0.6
'@types/babel__core@7.20.5': '@types/babel__core@7.20.5':
dependencies: dependencies:
'@babel/parser': 7.26.2 '@babel/parser': 7.26.2
@ -4308,6 +4514,10 @@ snapshots:
'@types/dom-view-transitions@1.0.5': {} '@types/dom-view-transitions@1.0.5': {}
'@types/estree-jsx@1.0.5':
dependencies:
'@types/estree': 1.0.6
'@types/estree@1.0.6': {} '@types/estree@1.0.6': {}
'@types/hast@3.0.4': '@types/hast@3.0.4':
@ -4320,6 +4530,8 @@ snapshots:
dependencies: dependencies:
'@types/unist': 3.0.3 '@types/unist': 3.0.3
'@types/mdx@2.0.13': {}
'@types/ms@0.7.34': {} '@types/ms@0.7.34': {}
'@types/nlcst@2.0.3': '@types/nlcst@2.0.3':
@ -4345,6 +4557,8 @@ snapshots:
dependencies: dependencies:
htmlparser2: 8.0.2 htmlparser2: 8.0.2
'@types/unist@2.0.11': {}
'@types/unist@3.0.3': {} '@types/unist@3.0.3': {}
'@typescript-eslint/parser@8.18.0(eslint@9.15.0(jiti@1.21.6))(typescript@5.7.2)': '@typescript-eslint/parser@8.18.0(eslint@9.15.0(jiti@1.21.6))(typescript@5.7.2)':
@ -4612,6 +4826,8 @@ snapshots:
ast-types-flow@0.0.8: {} ast-types-flow@0.0.8: {}
astring@1.9.0: {}
astro-eslint-parser@1.1.0(typescript@5.7.2): astro-eslint-parser@1.1.0(typescript@5.7.2):
dependencies: dependencies:
'@astrojs/compiler': 2.10.3 '@astrojs/compiler': 2.10.3
@ -4808,6 +5024,8 @@ snapshots:
character-entities@2.0.2: {} character-entities@2.0.2: {}
character-reference-invalid@2.0.1: {}
chokidar@3.6.0: chokidar@3.6.0:
dependencies: dependencies:
anymatch: 3.1.3 anymatch: 3.1.3
@ -4847,6 +5065,8 @@ snapshots:
clsx@2.1.1: {} clsx@2.1.1: {}
collapse-white-space@2.1.0: {}
color-convert@2.0.1: color-convert@2.0.1:
dependencies: dependencies:
color-name: 1.1.4 color-name: 1.1.4
@ -5087,6 +5307,20 @@ snapshots:
is-date-object: 1.0.5 is-date-object: 1.0.5
is-symbol: 1.0.4 is-symbol: 1.0.4
esast-util-from-estree@2.0.0:
dependencies:
'@types/estree-jsx': 1.0.5
devlop: 1.1.0
estree-util-visit: 2.0.0
unist-util-position-from-estree: 2.0.0
esast-util-from-js@2.0.1:
dependencies:
'@types/estree-jsx': 1.0.5
acorn: 8.14.0
esast-util-from-estree: 2.0.0
vfile-message: 4.0.2
esbuild@0.21.5: esbuild@0.21.5:
optionalDependencies: optionalDependencies:
'@esbuild/aix-ppc64': 0.21.5 '@esbuild/aix-ppc64': 0.21.5
@ -5253,6 +5487,35 @@ snapshots:
estraverse@5.3.0: {} estraverse@5.3.0: {}
estree-util-attach-comments@3.0.0:
dependencies:
'@types/estree': 1.0.6
estree-util-build-jsx@3.0.1:
dependencies:
'@types/estree-jsx': 1.0.5
devlop: 1.1.0
estree-util-is-identifier-name: 3.0.0
estree-walker: 3.0.3
estree-util-is-identifier-name@3.0.0: {}
estree-util-scope@1.0.0:
dependencies:
'@types/estree': 1.0.6
devlop: 1.1.0
estree-util-to-js@2.0.0:
dependencies:
'@types/estree-jsx': 1.0.5
astring: 1.9.0
source-map: 0.7.4
estree-util-visit@2.0.0:
dependencies:
'@types/estree-jsx': 1.0.5
'@types/unist': 3.0.3
estree-walker@2.0.2: {} estree-walker@2.0.2: {}
estree-walker@3.0.3: estree-walker@3.0.3:
@ -5522,6 +5785,27 @@ snapshots:
web-namespaces: 2.0.1 web-namespaces: 2.0.1
zwitch: 2.0.4 zwitch: 2.0.4
hast-util-to-estree@3.1.0:
dependencies:
'@types/estree': 1.0.6
'@types/estree-jsx': 1.0.5
'@types/hast': 3.0.4
comma-separated-tokens: 2.0.3
devlop: 1.1.0
estree-util-attach-comments: 3.0.0
estree-util-is-identifier-name: 3.0.0
hast-util-whitespace: 3.0.0
mdast-util-mdx-expression: 2.0.1
mdast-util-mdx-jsx: 3.1.3
mdast-util-mdxjs-esm: 2.0.1
property-information: 6.5.0
space-separated-tokens: 2.0.2
style-to-object: 0.4.4
unist-util-position: 5.0.0
zwitch: 2.0.4
transitivePeerDependencies:
- supports-color
hast-util-to-html@9.0.3: hast-util-to-html@9.0.3:
dependencies: dependencies:
'@types/hast': 3.0.4 '@types/hast': 3.0.4
@ -5536,6 +5820,26 @@ snapshots:
stringify-entities: 4.0.4 stringify-entities: 4.0.4
zwitch: 2.0.4 zwitch: 2.0.4
hast-util-to-jsx-runtime@2.3.2:
dependencies:
'@types/estree': 1.0.6
'@types/hast': 3.0.4
'@types/unist': 3.0.3
comma-separated-tokens: 2.0.3
devlop: 1.1.0
estree-util-is-identifier-name: 3.0.0
hast-util-whitespace: 3.0.0
mdast-util-mdx-expression: 2.0.1
mdast-util-mdx-jsx: 3.1.3
mdast-util-mdxjs-esm: 2.0.1
property-information: 6.5.0
space-separated-tokens: 2.0.2
style-to-object: 1.0.8
unist-util-position: 5.0.0
vfile-message: 4.0.2
transitivePeerDependencies:
- supports-color
hast-util-to-parse5@8.0.0: hast-util-to-parse5@8.0.0:
dependencies: dependencies:
'@types/hast': 3.0.4 '@types/hast': 3.0.4
@ -5607,12 +5911,23 @@ snapshots:
inherits@2.0.4: {} inherits@2.0.4: {}
inline-style-parser@0.1.1: {}
inline-style-parser@0.2.4: {}
internal-slot@1.0.7: internal-slot@1.0.7:
dependencies: dependencies:
es-errors: 1.3.0 es-errors: 1.3.0
hasown: 2.0.2 hasown: 2.0.2
side-channel: 1.0.6 side-channel: 1.0.6
is-alphabetical@2.0.1: {}
is-alphanumerical@2.0.1:
dependencies:
is-alphabetical: 2.0.1
is-decimal: 2.0.1
is-array-buffer@3.0.4: is-array-buffer@3.0.4:
dependencies: dependencies:
call-bind: 1.0.7 call-bind: 1.0.7
@ -5652,6 +5967,8 @@ snapshots:
dependencies: dependencies:
has-tostringtag: 1.0.2 has-tostringtag: 1.0.2
is-decimal@2.0.1: {}
is-docker@3.0.0: {} is-docker@3.0.0: {}
is-extglob@2.1.1: {} is-extglob@2.1.1: {}
@ -5676,6 +5993,8 @@ snapshots:
dependencies: dependencies:
is-extglob: 2.1.1 is-extglob: 2.1.1
is-hexadecimal@2.0.1: {}
is-inside-container@1.0.0: is-inside-container@1.0.0:
dependencies: dependencies:
is-docker: 3.0.0 is-docker: 3.0.0
@ -5888,6 +6207,8 @@ snapshots:
dependencies: dependencies:
semver: 6.3.1 semver: 6.3.1
markdown-extensions@2.0.0: {}
markdown-table@3.0.4: {} markdown-table@3.0.4: {}
mdast-util-definitions@6.0.0: mdast-util-definitions@6.0.0:
@ -5977,6 +6298,55 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
mdast-util-mdx-expression@2.0.1:
dependencies:
'@types/estree-jsx': 1.0.5
'@types/hast': 3.0.4
'@types/mdast': 4.0.4
devlop: 1.1.0
mdast-util-from-markdown: 2.0.2
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
mdast-util-mdx-jsx@3.1.3:
dependencies:
'@types/estree-jsx': 1.0.5
'@types/hast': 3.0.4
'@types/mdast': 4.0.4
'@types/unist': 3.0.3
ccount: 2.0.1
devlop: 1.1.0
mdast-util-from-markdown: 2.0.2
mdast-util-to-markdown: 2.1.2
parse-entities: 4.0.1
stringify-entities: 4.0.4
unist-util-stringify-position: 4.0.0
vfile-message: 4.0.2
transitivePeerDependencies:
- supports-color
mdast-util-mdx@3.0.0:
dependencies:
mdast-util-from-markdown: 2.0.2
mdast-util-mdx-expression: 2.0.1
mdast-util-mdx-jsx: 3.1.3
mdast-util-mdxjs-esm: 2.0.1
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
mdast-util-mdxjs-esm@2.0.1:
dependencies:
'@types/estree-jsx': 1.0.5
'@types/hast': 3.0.4
'@types/mdast': 4.0.4
devlop: 1.1.0
mdast-util-from-markdown: 2.0.2
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
mdast-util-phrasing@4.1.0: mdast-util-phrasing@4.1.0:
dependencies: dependencies:
'@types/mdast': 4.0.4 '@types/mdast': 4.0.4
@ -6091,6 +6461,58 @@ snapshots:
micromark-util-combine-extensions: 2.0.1 micromark-util-combine-extensions: 2.0.1
micromark-util-types: 2.0.1 micromark-util-types: 2.0.1
micromark-extension-mdx-expression@3.0.0:
dependencies:
'@types/estree': 1.0.6
devlop: 1.1.0
micromark-factory-mdx-expression: 2.0.2
micromark-factory-space: 2.0.1
micromark-util-character: 2.1.1
micromark-util-events-to-acorn: 2.0.2
micromark-util-symbol: 2.0.1
micromark-util-types: 2.0.1
micromark-extension-mdx-jsx@3.0.1:
dependencies:
'@types/acorn': 4.0.6
'@types/estree': 1.0.6
devlop: 1.1.0
estree-util-is-identifier-name: 3.0.0
micromark-factory-mdx-expression: 2.0.2
micromark-factory-space: 2.0.1
micromark-util-character: 2.1.1
micromark-util-events-to-acorn: 2.0.2
micromark-util-symbol: 2.0.1
micromark-util-types: 2.0.1
vfile-message: 4.0.2
micromark-extension-mdx-md@2.0.0:
dependencies:
micromark-util-types: 2.0.1
micromark-extension-mdxjs-esm@3.0.0:
dependencies:
'@types/estree': 1.0.6
devlop: 1.1.0
micromark-core-commonmark: 2.0.2
micromark-util-character: 2.1.1
micromark-util-events-to-acorn: 2.0.2
micromark-util-symbol: 2.0.1
micromark-util-types: 2.0.1
unist-util-position-from-estree: 2.0.0
vfile-message: 4.0.2
micromark-extension-mdxjs@3.0.0:
dependencies:
acorn: 8.14.0
acorn-jsx: 5.3.2(acorn@8.14.0)
micromark-extension-mdx-expression: 3.0.0
micromark-extension-mdx-jsx: 3.0.1
micromark-extension-mdx-md: 2.0.0
micromark-extension-mdxjs-esm: 3.0.0
micromark-util-combine-extensions: 2.0.1
micromark-util-types: 2.0.1
micromark-factory-destination@2.0.1: micromark-factory-destination@2.0.1:
dependencies: dependencies:
micromark-util-character: 2.1.1 micromark-util-character: 2.1.1
@ -6104,6 +6526,18 @@ snapshots:
micromark-util-symbol: 2.0.1 micromark-util-symbol: 2.0.1
micromark-util-types: 2.0.1 micromark-util-types: 2.0.1
micromark-factory-mdx-expression@2.0.2:
dependencies:
'@types/estree': 1.0.6
devlop: 1.1.0
micromark-factory-space: 2.0.1
micromark-util-character: 2.1.1
micromark-util-events-to-acorn: 2.0.2
micromark-util-symbol: 2.0.1
micromark-util-types: 2.0.1
unist-util-position-from-estree: 2.0.0
vfile-message: 4.0.2
micromark-factory-space@2.0.1: micromark-factory-space@2.0.1:
dependencies: dependencies:
micromark-util-character: 2.1.1 micromark-util-character: 2.1.1
@ -6156,6 +6590,17 @@ snapshots:
micromark-util-encode@2.0.1: {} micromark-util-encode@2.0.1: {}
micromark-util-events-to-acorn@2.0.2:
dependencies:
'@types/acorn': 4.0.6
'@types/estree': 1.0.6
'@types/unist': 3.0.3
devlop: 1.1.0
estree-util-visit: 2.0.0
micromark-util-symbol: 2.0.1
micromark-util-types: 2.0.1
vfile-message: 4.0.2
micromark-util-html-tag-name@2.0.1: {} micromark-util-html-tag-name@2.0.1: {}
micromark-util-normalize-identifier@2.0.1: micromark-util-normalize-identifier@2.0.1:
@ -6376,6 +6821,17 @@ snapshots:
dependencies: dependencies:
callsites: 3.1.0 callsites: 3.1.0
parse-entities@4.0.1:
dependencies:
'@types/unist': 2.0.11
character-entities: 2.0.2
character-entities-legacy: 3.0.0
character-reference-invalid: 2.0.1
decode-named-character-reference: 1.0.2
is-alphanumerical: 2.0.1
is-decimal: 2.0.1
is-hexadecimal: 2.0.1
parse-latin@7.0.0: parse-latin@7.0.0:
dependencies: dependencies:
'@types/nlcst': 2.0.3 '@types/nlcst': 2.0.3
@ -6543,6 +6999,36 @@ snapshots:
readdirp@4.0.2: {} readdirp@4.0.2: {}
recma-build-jsx@1.0.0:
dependencies:
'@types/estree': 1.0.6
estree-util-build-jsx: 3.0.1
vfile: 6.0.3
recma-jsx@1.0.0(acorn@8.14.0):
dependencies:
acorn-jsx: 5.3.2(acorn@8.14.0)
estree-util-to-js: 2.0.0
recma-parse: 1.0.0
recma-stringify: 1.0.0
unified: 11.0.5
transitivePeerDependencies:
- acorn
recma-parse@1.0.0:
dependencies:
'@types/estree': 1.0.6
esast-util-from-js: 2.0.1
unified: 11.0.5
vfile: 6.0.3
recma-stringify@1.0.0:
dependencies:
'@types/estree': 1.0.6
estree-util-to-js: 2.0.0
unified: 11.0.5
vfile: 6.0.3
reflect.getprototypeof@1.0.7: reflect.getprototypeof@1.0.7:
dependencies: dependencies:
call-bind: 1.0.7 call-bind: 1.0.7
@ -6582,6 +7068,14 @@ snapshots:
hast-util-raw: 9.1.0 hast-util-raw: 9.1.0
vfile: 6.0.3 vfile: 6.0.3
rehype-recma@1.0.0:
dependencies:
'@types/estree': 1.0.6
'@types/hast': 3.0.4
hast-util-to-estree: 3.1.0
transitivePeerDependencies:
- supports-color
rehype-stringify@10.0.1: rehype-stringify@10.0.1:
dependencies: dependencies:
'@types/hast': 3.0.4 '@types/hast': 3.0.4
@ -6606,6 +7100,13 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
remark-mdx@3.1.0:
dependencies:
mdast-util-mdx: 3.0.0
micromark-extension-mdxjs: 3.0.0
transitivePeerDependencies:
- supports-color
remark-parse@11.0.0: remark-parse@11.0.0:
dependencies: dependencies:
'@types/mdast': 4.0.4 '@types/mdast': 4.0.4
@ -6850,6 +7351,8 @@ snapshots:
source-map-js@1.2.1: {} source-map-js@1.2.1: {}
source-map@0.7.4: {}
space-separated-tokens@2.0.2: {} space-separated-tokens@2.0.2: {}
sprintf-js@1.0.3: {} sprintf-js@1.0.3: {}
@ -6924,6 +7427,14 @@ snapshots:
strnum@1.0.5: {} strnum@1.0.5: {}
style-to-object@0.4.4:
dependencies:
inline-style-parser: 0.1.1
style-to-object@1.0.8:
dependencies:
inline-style-parser: 0.2.4
sucrase@3.35.0: sucrase@3.35.0:
dependencies: dependencies:
'@jridgewell/gen-mapping': 0.3.5 '@jridgewell/gen-mapping': 0.3.5
@ -7099,6 +7610,10 @@ snapshots:
'@types/unist': 3.0.3 '@types/unist': 3.0.3
array-iterate: 2.0.1 array-iterate: 2.0.1
unist-util-position-from-estree@2.0.0:
dependencies:
'@types/unist': 3.0.3
unist-util-position@5.0.0: unist-util-position@5.0.0:
dependencies: dependencies:
'@types/unist': 3.0.3 '@types/unist': 3.0.3

View file

@ -1,6 +1,5 @@
--- ---
import { config } from "~/config" import { config } from "~/config"
import { type Post } from "~/types/post"
import { formatDate, getPosts } from "~/utils" import { formatDate, getPosts } from "~/utils"
const posts = (await getPosts()).slice(0, config.latestPosts ?? 8) const posts = (await getPosts()).slice(0, config.latestPosts ?? 8)
@ -8,13 +7,13 @@ const posts = (await getPosts()).slice(0, config.latestPosts ?? 8)
<div class="mb-4 text-xl font-medium md:my-8">近期文章</div> <div class="mb-4 text-xl font-medium md:my-8">近期文章</div>
{ {
posts.map((post: Post) => ( posts.map((post: any) => (
<a href={`/posts/${post.slug}/`}> <a href={`/posts/${post.slug}/`} class="visited:text-purple-500/90">
<div class="my-2 flex text-lg"> <div class="my-2 flex text-lg">
<p class="flex w-36 flex-shrink-0 truncate text-gray-500 dark:text-gray-400"> <p class="flex w-36 flex-shrink-0 truncate text-gray-500 dark:text-gray-400">
<time>{formatDate(post.data.pubDate)}</time> <time>{formatDate(post.data.pubDate)}</time>
</p> </p>
<p class="line-clamp-3">{post.data.title}</p> <p class="line-clamp-2">{post.data.title}</p>
</div> </div>
</a> </a>
)) ))

View file

@ -1,5 +0,0 @@
---
import { config } from "~/config"
---
<div class="mb-10">{config.intro}</div>

View file

@ -34,6 +34,5 @@ export const config = {
}, },
], ],
}, },
intro: `🖥️ 前端小学生|📸 摄影爱好者|🛸 旅行探索家|🚴 骑行蹭风选手|🍎 科技产品发烧友`,
latestPosts: 8, latestPosts: 8,
} }

View file

@ -1,7 +1,6 @@
import { defineCollection, z } from "astro:content" import { defineCollection, z } from "astro:content"
const posts = defineCollection({ const posts = defineCollection({
type: "content",
schema: z.object({ schema: z.object({
title: z.string(), title: z.string(),
description: z.string(), description: z.string(),

18
src/content/about.mdx Normal file
View file

@ -0,0 +1,18 @@
---
layout: ../layouts/post.astro
title: "关于我"
description: "前端开发者 | 摄影爱好者 | 骑行爱好者"
---
export const title = "About Me"
## {title}
<img
className="block dark:hidden"
src="https://cdn.jsdelivr.net/gh/sun0225SUN/sun0225SUN/profile-snake-contrib/github-contribution-grid-snake.svg"
/>
<img
className="hidden dark:block"
src="https://cdn.jsdelivr.net/gh/sun0225SUN/sun0225SUN/profile-snake-contrib/github-contribution-grid-snake-dark.svg"
/>

1
src/content/intro.mdx Normal file
View file

@ -0,0 +1 @@
🖥️ 前端小学生|📸 摄影爱好者|🛸 旅行探索家|🚴 骑行蹭风选手|🍎 科技产品发烧友

View file

@ -5,7 +5,7 @@ import BaseLayout from "./base.astro"
--- ---
<BaseLayout> <BaseLayout>
<main class="max-auto w-full max-w-3xl"> <main class="max-auto mb-10 w-full max-w-3xl">
<Header /> <Header />
<Nav /> <Nav />
<slot /> <slot />

View file

@ -2,13 +2,40 @@
import type { CollectionEntry } from "astro:content" import type { CollectionEntry } from "astro:content"
import HomeLayout from "~/layouts/home.astro" import HomeLayout from "~/layouts/home.astro"
import "~/styles/post.css" import "~/styles/post.css"
import { formatDate } from "~/utils"
type Props = CollectionEntry<"posts">["data"] type Props = CollectionEntry<"posts">["data"]
const { title, description, pubDate, updatedDate } = Astro.props const { title, description, pubDate, updatedDate } = Astro.props
--- ---
<HomeLayout> <HomeLayout>
<article class="prose my-10 dark:prose-invert"> <head slot="head">
<title>{title}</title>
{description && <meta name="description" content={description} />}
</head>
{
title && (
<div class="mb-4 flex flex-col gap-3">
<h1 class="text-2xl font-bold">{title}</h1>
{pubDate && (
<p class="text-sm text-gray-500 dark:text-gray-400">
{formatDate(pubDate)}
</p>
)}
</div>
)
}
<article class="prose dark:prose-invert">
<slot /> <slot />
</article> </article>
{
updatedDate && (
<div class="mt-10">
<p class="text-sm text-gray-500 dark:text-gray-400">
更新时间:{formatDate(updatedDate)}
</p>
</div>
)
}
</HomeLayout> </HomeLayout>

View file

@ -0,0 +1,5 @@
---
import About from "~/content/about.mdx"
---
<About />

View file

@ -1,56 +0,0 @@
---
layout: ../../layouts/post.astro
title: "关于我"
description: "前端开发者 | 摄影爱好者 | 骑行爱好者"
---
# 👋 你好,我是小孙同学
一名热爱技术、热爱生活的前端开发者。喜欢尝试新事物,记录生活点滴。
## 🎯 关于我
- 🖥️ 前端开发者,持续学习各种新技术
- 📸 摄影爱好者,喜欢用镜头记录美好瞬间
- 🚴 骑行爱好者,享受风吹过脸庞的感觉
- 🛸 喜欢旅行,探索世界的每个角落
- 🍎 科技产品发烧友,特别钟爱苹果生态
## 💻 技术栈
- 前端HTML, CSS, JavaScript, TypeScript
- 框架React, Vue, Astro
- 工具Git, Webpack, Vite
- 其他Node.js, 响应式设计
## 📸 摄影装备
- 相机Sony A7M3
- 镜头:
- 35mm f1.8 (风景、街拍)
- 85mm f1.8 (人像)
- 16-35mm f4 (广角风景)
## 🚲 骑行装备
- 公路车Specialized Allez
- 装备:头盔、手套、骑行服
## 📫 联系我
- GitHub: [github.com/sun0225SUN](https://github.com/sun0225SUN)
- Blog: [sunguoqi.com](https://sunguoqi.com)
## 🎯 未来计划
1. 继续深入学习前端技术
2. 多写技术博客,分享经验
3. 参与开源项目
4. 探索更多有趣的地方
5. 拍更多好看的照片
---
> 热爱可抵岁月漫长。山高路远,独善其身,看世界,也找自己。
这个博客将记录我在技术、摄影、骑行等方面的心得体会和生活感悟。希望能在这里遇见志同道合的朋友!

View file

@ -6,7 +6,7 @@ import { formatDate, getPosts } from "~/utils"
const posts = await getPosts() const posts = await getPosts()
const postsByYear = posts.reduce( const postsByYear = posts.reduce(
(acc: Record<string, Post[]>, post: Post) => { (acc: Record<string, Post[]>, post: any) => {
const year = new Date(post.data.pubDate).getFullYear().toString() const year = new Date(post.data.pubDate).getFullYear().toString()
if (!acc[year]) { if (!acc[year]) {
acc[year] = [] acc[year] = []
@ -27,13 +27,13 @@ const years = Object.keys(postsByYear).sort((a, b) => Number(b) - Number(a))
<div class="year-group"> <div class="year-group">
<h2 class="mb-4 text-2xl font-bold">{year}</h2> <h2 class="mb-4 text-2xl font-bold">{year}</h2>
<div class="space-y-2"> <div class="space-y-2">
{postsByYear[year].map((post: Post) => ( {postsByYear[year].map((post: any) => (
<a href={`/posts/${post.slug}/`}> <a href={`/posts/${post.slug}/`}>
<div class="my-2 flex text-lg"> <div class="my-2 flex text-lg">
<p class="flex w-36 flex-shrink-0 truncate text-gray-500 dark:text-gray-400"> <p class="flex w-36 flex-shrink-0 truncate text-gray-500 dark:text-gray-400">
<time>{formatDate(post.data.pubDate)}</time> <time>{formatDate(post.data.pubDate)}</time>
</p> </p>
<p class="line-clamp-3">{post.data.title}</p> <p class="line-clamp-2">{post.data.title}</p>
</div> </div>
</a> </a>
))} ))}

View file

@ -1,7 +1,7 @@
--- ---
import Blog from "~/components/astro/blog.astro" import Blog from "~/components/astro/blog.astro"
import Footer from "~/components/astro/footer.astro" import Footer from "~/components/astro/footer.astro"
import Intro from "~/components/astro/intro.astro" import Intro from "~/content/intro.mdx"
import HomeLayout from "~/layouts/home.astro" import HomeLayout from "~/layouts/home.astro"
--- ---

View file

@ -4,7 +4,9 @@ import { formatDate, getPosts } from "~/utils"
export async function getStaticPaths() { export async function getStaticPaths() {
const posts = await getPosts() const posts = await getPosts()
const uniqueTags = [...new Set(posts.flatMap((post) => post.data.tags || []))] const uniqueTags = [
...new Set(posts.flatMap((post: any) => post.data.tags || [])),
]
return uniqueTags.map((tag) => ({ return uniqueTags.map((tag) => ({
params: { tag }, params: { tag },
@ -14,19 +16,21 @@ export async function getStaticPaths() {
const { tag } = Astro.params const { tag } = Astro.params
const { posts } = Astro.props const { posts } = Astro.props
const filteredPosts = posts.filter((post) => post.data.tags?.includes(tag)) const filteredPosts = posts.filter((post: any) =>
post.data.tags?.includes(tag as string),
)
--- ---
<HomeLayout> <HomeLayout>
<ul> <ul>
{ {
filteredPosts.map((post) => ( filteredPosts.map((post: any) => (
<a href={`/posts/${post.slug}/`}> <a href={`/posts/${post.slug}/`}>
<div class="my-2 flex text-lg"> <div class="my-2 flex text-lg">
<p class="flex w-36 flex-shrink-0 truncate text-gray-500 dark:text-gray-400"> <p class="flex w-36 flex-shrink-0 truncate text-gray-500 dark:text-gray-400">
<time>{formatDate(post.data.pubDate)}</time> <time>{formatDate(post.data.pubDate)}</time>
</p> </p>
<p class="line-clamp-3">{post.data.title}</p> <p class="line-clamp-2">{post.data.title}</p>
</div> </div>
</a> </a>
)) ))

View file

@ -3,7 +3,7 @@ import HomeLayout from "~/layouts/home.astro"
import { getPosts } from "~/utils" import { getPosts } from "~/utils"
const posts = await getPosts() const posts = await getPosts()
const tags = [...new Set(posts.map((post) => post.data.tags).flat())] const tags = [...new Set(posts.map((post: any) => post.data.tags).flat())]
--- ---
<HomeLayout> <HomeLayout>

View file

@ -1,7 +0,0 @@
export interface Post {
slug: string
data: {
title: string
pubDate: Date
}
}

View file

@ -1,10 +1,16 @@
import type { CollectionEntry } from "astro:content" import type { CollectionEntry } from "astro:content"
import { getCollection } from "astro:content" import { getCollection } from "astro:content"
export const formatDate = (date: Date): string => { export const formatDate = (date: Date | string | undefined): string => {
const year = date.getFullYear() const validDate = date ? new Date(date) : new Date()
const month = String(date.getMonth() + 1).padStart(2, "0")
const day = String(date.getDate()).padStart(2, "0") if (isNaN(validDate.getTime())) {
return "wrong date"
}
const year = validDate.getFullYear()
const month = String(validDate.getMonth() + 1).padStart(2, "0")
const day = String(validDate.getDate()).padStart(2, "0")
return `${year}-${month}-${day}` return `${year}-${month}-${day}`
} }