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,36 +11,42 @@ import icon from 'astro-icon'
import react from '@astrojs/react'
import cloudflare from '@astrojs/cloudflare';
// https://astro.build/config
export default defineConfig({
site: 'https://blog.kazoottt.top',
integrations: [
expressiveCode(expressiveCodeOptions),
tailwind({
applyBaseStyles: false
}),
sitemap(),
mdx(),
icon(),
react()
site: 'https://blog.kazoottt.top',
integrations: [
expressiveCode(expressiveCodeOptions),
tailwind({
applyBaseStyles: false
}),
sitemap(),
mdx(),
icon(),
react()
],
markdown: {
remarkPlugins: [remarkUnwrapImages, remarkReadingTime],
rehypePlugins: [
[
rehypeExternalLinks,
{
target: '_blank',
rel: ['nofollow, noopener, noreferrer']
}
]
],
remarkRehype: {
footnoteLabelProperties: {
className: ['']
}
}
markdown: {
remarkPlugins: [remarkUnwrapImages, remarkReadingTime],
rehypePlugins: [
[
rehypeExternalLinks,
{
target: '_blank',
rel: ['nofollow, noopener, noreferrer']
}
]
],
remarkRehype: {
footnoteLabelProperties: {
className: ['']
}
}
},
prefetch: true,
output: 'server',
})
prefetch: true,
output: 'server',
adapter: cloudflare(),
})