feat: add RSS integration and generate feed content
This commit is contained in:
parent
3ab8839462
commit
bf5637cdb9
3 changed files with 172 additions and 18 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "my-blog",
|
||||
"name": "astro-air",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@astrojs/react": "^3.6.3",
|
||||
"@astrojs/rss": "^4.0.9",
|
||||
"@astrojs/tailwind": "^5.1.2",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
|
|
@ -20,11 +21,14 @@
|
|||
"lucide-react": "^0.461.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"sanitize-html": "^2.13.1",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"typescript": "^5.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@types/node": "^22.10.0",
|
||||
"@types/sanitize-html": "^2.13.0",
|
||||
"@typescript-eslint/parser": "^8.16.0",
|
||||
"eslint": "^9.15.0",
|
||||
"eslint-plugin-astro": "^1.3.1",
|
||||
|
|
|
|||
158
pnpm-lock.yaml
generated
158
pnpm-lock.yaml
generated
|
|
@ -13,10 +13,13 @@ importers:
|
|||
version: 0.9.4(prettier-plugin-astro@0.14.1)(prettier@3.4.0)(typescript@5.7.2)
|
||||
'@astrojs/react':
|
||||
specifier: ^3.6.3
|
||||
version: 3.6.3(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
version: 3.6.3(@types/node@22.10.0)(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
'@astrojs/rss':
|
||||
specifier: ^4.0.9
|
||||
version: 4.0.9
|
||||
'@astrojs/tailwind':
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.2(astro@5.0.0-beta.10(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))(tailwindcss@3.4.15)
|
||||
version: 5.1.2(astro@5.0.0-beta.10(@types/node@22.10.0)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))(tailwindcss@3.4.15)
|
||||
'@types/react':
|
||||
specifier: ^18.3.12
|
||||
version: 18.3.12
|
||||
|
|
@ -25,7 +28,7 @@ importers:
|
|||
version: 18.3.1
|
||||
astro:
|
||||
specifier: ^5.0.0-beta.10
|
||||
version: 5.0.0-beta.10(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1)
|
||||
version: 5.0.0-beta.10(@types/node@22.10.0)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1)
|
||||
lucide-react:
|
||||
specifier: ^0.461.0
|
||||
version: 0.461.0(react@18.3.1)
|
||||
|
|
@ -35,6 +38,9 @@ importers:
|
|||
react-dom:
|
||||
specifier: ^18.3.1
|
||||
version: 18.3.1(react@18.3.1)
|
||||
sanitize-html:
|
||||
specifier: ^2.13.1
|
||||
version: 2.13.1
|
||||
tailwindcss:
|
||||
specifier: ^3.4.15
|
||||
version: 3.4.15
|
||||
|
|
@ -45,6 +51,12 @@ importers:
|
|||
'@tailwindcss/typography':
|
||||
specifier: ^0.5.15
|
||||
version: 0.5.15(tailwindcss@3.4.15)
|
||||
'@types/node':
|
||||
specifier: ^22.10.0
|
||||
version: 22.10.0
|
||||
'@types/sanitize-html':
|
||||
specifier: ^2.13.0
|
||||
version: 2.13.0
|
||||
'@typescript-eslint/parser':
|
||||
specifier: ^8.16.0
|
||||
version: 8.16.0(eslint@9.15.0(jiti@1.21.6))(typescript@5.7.2)
|
||||
|
|
@ -123,6 +135,9 @@ packages:
|
|||
react: ^17.0.2 || ^18.0.0 || ^19.0.0-beta
|
||||
react-dom: ^17.0.2 || ^18.0.0 || ^19.0.0-beta
|
||||
|
||||
'@astrojs/rss@4.0.9':
|
||||
resolution: {integrity: sha512-W1qeLc/WP1vMS5xXa+BnaLU0paeSeGjN8RJVAoBaOIkQuKXjIUA9hvPno89heo73in5i67g40gy70oeeHMqp6A==}
|
||||
|
||||
'@astrojs/tailwind@5.1.2':
|
||||
resolution: {integrity: sha512-IvOF0W/dtHElcXvhrPR35nHmhyV3cfz1EzPitMGtU7sYy9Hci3BNK1To6FWmVuuNKPxza1IgCGetSynJZL7fOg==}
|
||||
peerDependencies:
|
||||
|
|
@ -901,6 +916,9 @@ packages:
|
|||
'@types/nlcst@2.0.3':
|
||||
resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==}
|
||||
|
||||
'@types/node@22.10.0':
|
||||
resolution: {integrity: sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==}
|
||||
|
||||
'@types/prop-types@15.7.13':
|
||||
resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==}
|
||||
|
||||
|
|
@ -910,6 +928,9 @@ packages:
|
|||
'@types/react@18.3.12':
|
||||
resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==}
|
||||
|
||||
'@types/sanitize-html@2.13.0':
|
||||
resolution: {integrity: sha512-X31WxbvW9TjIhZZNyNBZ/p5ax4ti7qsNDBDEnH4zAgmEh35YnFD1UiS6z9Cd34kKm0LslFW0KPmTQzu/oGtsqQ==}
|
||||
|
||||
'@types/unist@3.0.3':
|
||||
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
|
||||
|
||||
|
|
@ -1288,6 +1309,10 @@ packages:
|
|||
deep-is@0.1.4:
|
||||
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
||||
|
||||
deepmerge@4.3.1:
|
||||
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
define-data-property@1.1.4:
|
||||
resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
|
@ -1328,6 +1353,19 @@ packages:
|
|||
dlv@1.1.3:
|
||||
resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
|
||||
|
||||
dom-serializer@2.0.0:
|
||||
resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}
|
||||
|
||||
domelementtype@2.3.0:
|
||||
resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
|
||||
|
||||
domhandler@5.0.3:
|
||||
resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
|
||||
engines: {node: '>= 4'}
|
||||
|
||||
domutils@3.1.0:
|
||||
resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==}
|
||||
|
||||
dset@3.1.4:
|
||||
resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==}
|
||||
engines: {node: '>=4'}
|
||||
|
|
@ -1510,6 +1548,10 @@ packages:
|
|||
fast-uri@3.0.3:
|
||||
resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==}
|
||||
|
||||
fast-xml-parser@4.5.0:
|
||||
resolution: {integrity: sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==}
|
||||
hasBin: true
|
||||
|
||||
fastq@1.17.1:
|
||||
resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==}
|
||||
|
||||
|
|
@ -1699,6 +1741,9 @@ packages:
|
|||
html-void-elements@3.0.0:
|
||||
resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==}
|
||||
|
||||
htmlparser2@8.0.2:
|
||||
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
|
||||
|
||||
http-cache-semantics@4.1.1:
|
||||
resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==}
|
||||
|
||||
|
|
@ -1826,6 +1871,10 @@ packages:
|
|||
resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
is-plain-object@5.0.0:
|
||||
resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
is-regex@1.1.4:
|
||||
resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
|
@ -2303,6 +2352,9 @@ packages:
|
|||
parse-latin@7.0.0:
|
||||
resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==}
|
||||
|
||||
parse-srcset@1.0.2:
|
||||
resolution: {integrity: sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==}
|
||||
|
||||
parse5@7.2.1:
|
||||
resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==}
|
||||
|
||||
|
|
@ -2645,6 +2697,9 @@ packages:
|
|||
resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
sanitize-html@2.13.1:
|
||||
resolution: {integrity: sha512-ZXtKq89oue4RP7abL9wp/9URJcqQNABB5GGJ2acW1sdO8JTVl92f4ygD7Yc9Ze09VAZhnt2zegeU0tbNsdcLYg==}
|
||||
|
||||
sass-formatter@0.7.9:
|
||||
resolution: {integrity: sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==}
|
||||
|
||||
|
|
@ -2773,6 +2828,9 @@ packages:
|
|||
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
strnum@1.0.5:
|
||||
resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==}
|
||||
|
||||
sucrase@3.35.0:
|
||||
resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==}
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
|
|
@ -2881,6 +2939,9 @@ packages:
|
|||
unbox-primitive@1.0.2:
|
||||
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
|
||||
|
||||
undici-types@6.20.0:
|
||||
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
|
||||
|
||||
unified@11.0.5:
|
||||
resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==}
|
||||
|
||||
|
|
@ -3315,15 +3376,15 @@ snapshots:
|
|||
dependencies:
|
||||
prismjs: 1.29.0
|
||||
|
||||
'@astrojs/react@3.6.3(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
|
||||
'@astrojs/react@3.6.3(@types/node@22.10.0)(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
|
||||
dependencies:
|
||||
'@types/react': 18.3.12
|
||||
'@types/react-dom': 18.3.1
|
||||
'@vitejs/plugin-react': 4.3.3(vite@5.4.11)
|
||||
'@vitejs/plugin-react': 4.3.3(vite@5.4.11(@types/node@22.10.0))
|
||||
react: 18.3.1
|
||||
react-dom: 18.3.1(react@18.3.1)
|
||||
ultrahtml: 1.5.3
|
||||
vite: 5.4.11
|
||||
vite: 5.4.11(@types/node@22.10.0)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- less
|
||||
|
|
@ -3335,9 +3396,14 @@ snapshots:
|
|||
- supports-color
|
||||
- terser
|
||||
|
||||
'@astrojs/tailwind@5.1.2(astro@5.0.0-beta.10(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))(tailwindcss@3.4.15)':
|
||||
'@astrojs/rss@4.0.9':
|
||||
dependencies:
|
||||
astro: 5.0.0-beta.10(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1)
|
||||
fast-xml-parser: 4.5.0
|
||||
kleur: 4.1.5
|
||||
|
||||
'@astrojs/tailwind@5.1.2(astro@5.0.0-beta.10(@types/node@22.10.0)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1))(tailwindcss@3.4.15)':
|
||||
dependencies:
|
||||
astro: 5.0.0-beta.10(@types/node@22.10.0)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1)
|
||||
autoprefixer: 10.4.20(postcss@8.4.49)
|
||||
postcss: 8.4.49
|
||||
postcss-load-config: 4.0.2(postcss@8.4.49)
|
||||
|
|
@ -3954,6 +4020,10 @@ snapshots:
|
|||
dependencies:
|
||||
'@types/unist': 3.0.3
|
||||
|
||||
'@types/node@22.10.0':
|
||||
dependencies:
|
||||
undici-types: 6.20.0
|
||||
|
||||
'@types/prop-types@15.7.13': {}
|
||||
|
||||
'@types/react-dom@18.3.1':
|
||||
|
|
@ -3965,6 +4035,10 @@ snapshots:
|
|||
'@types/prop-types': 15.7.13
|
||||
csstype: 3.1.3
|
||||
|
||||
'@types/sanitize-html@2.13.0':
|
||||
dependencies:
|
||||
htmlparser2: 8.0.2
|
||||
|
||||
'@types/unist@3.0.3': {}
|
||||
|
||||
'@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@1.21.6))(typescript@5.7.2)':
|
||||
|
|
@ -4009,14 +4083,14 @@ snapshots:
|
|||
|
||||
'@ungap/structured-clone@1.2.0': {}
|
||||
|
||||
'@vitejs/plugin-react@4.3.3(vite@5.4.11)':
|
||||
'@vitejs/plugin-react@4.3.3(vite@5.4.11(@types/node@22.10.0))':
|
||||
dependencies:
|
||||
'@babel/core': 7.26.0
|
||||
'@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0)
|
||||
'@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0)
|
||||
'@types/babel__core': 7.20.5
|
||||
react-refresh: 0.14.2
|
||||
vite: 5.4.11
|
||||
vite: 5.4.11(@types/node@22.10.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
|
|
@ -4189,7 +4263,7 @@ snapshots:
|
|||
- supports-color
|
||||
- typescript
|
||||
|
||||
astro@5.0.0-beta.10(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1):
|
||||
astro@5.0.0-beta.10(@types/node@22.10.0)(jiti@1.21.6)(rollup@4.27.4)(typescript@5.7.2)(yaml@2.6.1):
|
||||
dependencies:
|
||||
'@astrojs/compiler': 2.10.3
|
||||
'@astrojs/internal-helpers': 0.4.1
|
||||
|
|
@ -4240,8 +4314,8 @@ snapshots:
|
|||
ultrahtml: 1.5.3
|
||||
unist-util-visit: 5.0.0
|
||||
vfile: 6.0.3
|
||||
vite: 6.0.0-beta.6(jiti@1.21.6)(yaml@2.6.1)
|
||||
vitefu: 1.0.3(vite@6.0.0-beta.6(jiti@1.21.6)(yaml@2.6.1))
|
||||
vite: 6.0.0-beta.6(@types/node@22.10.0)(jiti@1.21.6)(yaml@2.6.1)
|
||||
vitefu: 1.0.3(vite@6.0.0-beta.6(@types/node@22.10.0)(jiti@1.21.6)(yaml@2.6.1))
|
||||
which-pm: 3.0.0
|
||||
xxhash-wasm: 1.1.0
|
||||
yargs-parser: 21.1.1
|
||||
|
|
@ -4471,6 +4545,8 @@ snapshots:
|
|||
|
||||
deep-is@0.1.4: {}
|
||||
|
||||
deepmerge@4.3.1: {}
|
||||
|
||||
define-data-property@1.1.4:
|
||||
dependencies:
|
||||
es-define-property: 1.0.0
|
||||
|
|
@ -4508,6 +4584,24 @@ snapshots:
|
|||
|
||||
dlv@1.1.3: {}
|
||||
|
||||
dom-serializer@2.0.0:
|
||||
dependencies:
|
||||
domelementtype: 2.3.0
|
||||
domhandler: 5.0.3
|
||||
entities: 4.5.0
|
||||
|
||||
domelementtype@2.3.0: {}
|
||||
|
||||
domhandler@5.0.3:
|
||||
dependencies:
|
||||
domelementtype: 2.3.0
|
||||
|
||||
domutils@3.1.0:
|
||||
dependencies:
|
||||
dom-serializer: 2.0.0
|
||||
domelementtype: 2.3.0
|
||||
domhandler: 5.0.3
|
||||
|
||||
dset@3.1.4: {}
|
||||
|
||||
eastasianwidth@0.2.0: {}
|
||||
|
|
@ -4814,6 +4908,10 @@ snapshots:
|
|||
|
||||
fast-uri@3.0.3: {}
|
||||
|
||||
fast-xml-parser@4.5.0:
|
||||
dependencies:
|
||||
strnum: 1.0.5
|
||||
|
||||
fastq@1.17.1:
|
||||
dependencies:
|
||||
reusify: 1.0.4
|
||||
|
|
@ -5055,6 +5153,13 @@ snapshots:
|
|||
|
||||
html-void-elements@3.0.0: {}
|
||||
|
||||
htmlparser2@8.0.2:
|
||||
dependencies:
|
||||
domelementtype: 2.3.0
|
||||
domhandler: 5.0.3
|
||||
domutils: 3.1.0
|
||||
entities: 4.5.0
|
||||
|
||||
http-cache-semantics@4.1.1: {}
|
||||
|
||||
human-signals@5.0.0: {}
|
||||
|
|
@ -5157,6 +5262,8 @@ snapshots:
|
|||
|
||||
is-plain-obj@4.1.0: {}
|
||||
|
||||
is-plain-object@5.0.0: {}
|
||||
|
||||
is-regex@1.1.4:
|
||||
dependencies:
|
||||
call-bind: 1.0.7
|
||||
|
|
@ -5812,6 +5919,8 @@ snapshots:
|
|||
unist-util-visit-children: 3.0.0
|
||||
vfile: 6.0.3
|
||||
|
||||
parse-srcset@1.0.2: {}
|
||||
|
||||
parse5@7.2.1:
|
||||
dependencies:
|
||||
entities: 4.5.0
|
||||
|
|
@ -6146,6 +6255,15 @@ snapshots:
|
|||
es-errors: 1.3.0
|
||||
is-regex: 1.1.4
|
||||
|
||||
sanitize-html@2.13.1:
|
||||
dependencies:
|
||||
deepmerge: 4.3.1
|
||||
escape-string-regexp: 4.0.0
|
||||
htmlparser2: 8.0.2
|
||||
is-plain-object: 5.0.0
|
||||
parse-srcset: 1.0.2
|
||||
postcss: 8.4.49
|
||||
|
||||
sass-formatter@0.7.9:
|
||||
dependencies:
|
||||
suf-log: 2.5.3
|
||||
|
|
@ -6314,6 +6432,8 @@ snapshots:
|
|||
|
||||
strip-json-comments@3.1.1: {}
|
||||
|
||||
strnum@1.0.5: {}
|
||||
|
||||
sucrase@3.35.0:
|
||||
dependencies:
|
||||
'@jridgewell/gen-mapping': 0.3.5
|
||||
|
|
@ -6452,6 +6572,8 @@ snapshots:
|
|||
has-symbols: 1.0.3
|
||||
which-boxed-primitive: 1.0.2
|
||||
|
||||
undici-types@6.20.0: {}
|
||||
|
||||
unified@11.0.5:
|
||||
dependencies:
|
||||
'@types/unist': 3.0.3
|
||||
|
|
@ -6531,27 +6653,29 @@ snapshots:
|
|||
'@types/unist': 3.0.3
|
||||
vfile-message: 4.0.2
|
||||
|
||||
vite@5.4.11:
|
||||
vite@5.4.11(@types/node@22.10.0):
|
||||
dependencies:
|
||||
esbuild: 0.21.5
|
||||
postcss: 8.4.49
|
||||
rollup: 4.27.4
|
||||
optionalDependencies:
|
||||
'@types/node': 22.10.0
|
||||
fsevents: 2.3.3
|
||||
|
||||
vite@6.0.0-beta.6(jiti@1.21.6)(yaml@2.6.1):
|
||||
vite@6.0.0-beta.6(@types/node@22.10.0)(jiti@1.21.6)(yaml@2.6.1):
|
||||
dependencies:
|
||||
esbuild: 0.24.0
|
||||
postcss: 8.4.49
|
||||
rollup: 4.27.4
|
||||
optionalDependencies:
|
||||
'@types/node': 22.10.0
|
||||
fsevents: 2.3.3
|
||||
jiti: 1.21.6
|
||||
yaml: 2.6.1
|
||||
|
||||
vitefu@1.0.3(vite@6.0.0-beta.6(jiti@1.21.6)(yaml@2.6.1)):
|
||||
vitefu@1.0.3(vite@6.0.0-beta.6(@types/node@22.10.0)(jiti@1.21.6)(yaml@2.6.1)):
|
||||
optionalDependencies:
|
||||
vite: 6.0.0-beta.6(jiti@1.21.6)(yaml@2.6.1)
|
||||
vite: 6.0.0-beta.6(@types/node@22.10.0)(jiti@1.21.6)(yaml@2.6.1)
|
||||
|
||||
volar-service-css@0.0.62(@volar/language-service@2.4.10):
|
||||
dependencies:
|
||||
|
|
|
|||
26
src/pages/atom.xml.ts
Normal file
26
src/pages/atom.xml.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import rss from "@astrojs/rss"
|
||||
import type { CollectionEntry } from "astro:content"
|
||||
import sanitizeHtml from "sanitize-html"
|
||||
import { config } from "~/config"
|
||||
import { getPosts } from "~/utils"
|
||||
|
||||
export async function GET() {
|
||||
const posts = await getPosts()
|
||||
|
||||
return rss({
|
||||
title: config.meta.title,
|
||||
description: config.meta.description,
|
||||
site:
|
||||
process.env.NODE_ENV === "development"
|
||||
? "http://localhost:4321"
|
||||
: config.meta.url,
|
||||
items: posts.map((post: CollectionEntry<"posts">) => ({
|
||||
title: post.data.title,
|
||||
description: post.data.description,
|
||||
pubDate: post.data.pubDate,
|
||||
link: `/posts/${post.slug}/`,
|
||||
content: sanitizeHtml(post.body),
|
||||
})),
|
||||
customData: "",
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue