Skip to content

Commit

Permalink
feat: cloudflare integration
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-bloom committed Oct 20, 2024
1 parent c2589bc commit bf0a77e
Show file tree
Hide file tree
Showing 3 changed files with 897 additions and 1,296 deletions.
33 changes: 15 additions & 18 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ import { fileURLToPath } from 'url';

import { defineConfig } from 'astro/config';

import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import mdx from '@astrojs/mdx';
import partytown from '@astrojs/partytown';
import icon from 'astro-icon';
import compress from 'astro-compress';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import type { AstroIntegration } from 'astro';
import compress from 'astro-compress';
import icon from 'astro-icon';

import astrowind from './vendor/integration';

import { readingTimeRemarkPlugin, responsiveTablesRehypePlugin, lazyImagesRehypePlugin } from './src/utils/frontmatter';
import { lazyImagesRehypePlugin, readingTimeRemarkPlugin, responsiveTablesRehypePlugin } from './src/utils/frontmatter';

import cloudflare from '@astrojs/cloudflare';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

Expand All @@ -22,7 +24,7 @@ const whenExternalScripts = (items: (() => AstroIntegration) | (() => AstroInteg
hasExternalScripts ? (Array.isArray(items) ? items.map((item) => item()) : [items()]) : [];

export default defineConfig({
output: 'static',
output: 'server',

integrations: [
tailwind({
Expand All @@ -33,17 +35,6 @@ export default defineConfig({
icon({
include: {
tabler: ['*'],
'flat-color-icons': [
'template',
'gallery',
'approval',
'document',
'advertising',
'currency-exchange',
'voice-presentation',
'business-contact',
'database',
],
},
}),

Expand Down Expand Up @@ -72,7 +63,7 @@ export default defineConfig({
],

image: {
domains: ['cdn.pixabay.com'],
domains: [],
},

markdown: {
Expand All @@ -87,4 +78,10 @@ export default defineConfig({
},
},
},

adapter: cloudflare({
platformProxy: {
enabled: true,
},
}),
});
Loading

0 comments on commit bf0a77e

Please sign in to comment.