feat: add cloudflare adapter

This commit is contained in:
KazooTTT
2024-10-12 12:58:54 +08:00
parent 73fbc53517
commit 06f01acacc
3 changed files with 1033 additions and 322 deletions

View File

@ -11,9 +11,12 @@ import icon from 'astro-icon'
import react from '@astrojs/react' import react from '@astrojs/react'
import cloudflare from '@astrojs/cloudflare';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: 'https://blog.kazoottt.top', site: 'https://blog.kazoottt.top',
integrations: [ integrations: [
expressiveCode(expressiveCodeOptions), expressiveCode(expressiveCodeOptions),
tailwind({ tailwind({
@ -24,6 +27,7 @@ export default defineConfig({
icon(), icon(),
react() react()
], ],
markdown: { markdown: {
remarkPlugins: [remarkUnwrapImages, remarkReadingTime], remarkPlugins: [remarkUnwrapImages, remarkReadingTime],
rehypePlugins: [ rehypePlugins: [
@ -41,6 +45,8 @@ export default defineConfig({
} }
} }
}, },
prefetch: true, prefetch: true,
output: 'server', output: 'server',
adapter: cloudflare(),
}) })

View File

@ -18,6 +18,7 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.5.6", "@astrojs/check": "^0.5.6",
"@astrojs/cloudflare": "^11.1.0",
"@astrojs/mdx": "^2.1.1", "@astrojs/mdx": "^2.1.1",
"@astrojs/react": "^3.6.2", "@astrojs/react": "^3.6.2",
"@astrojs/rss": "^4.0.5", "@astrojs/rss": "^4.0.5",

1290
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff