Skip to content

Commit e10cac4

Browse files
committed
fix: fix docs config
1 parent 257b15b commit e10cac4

File tree

8 files changed

+667
-35
lines changed

8 files changed

+667
-35
lines changed

docs/astro.config.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import { defineConfig } from 'astro/config';
33
import starlight from '@astrojs/starlight';
44
import tailwindcss from '@tailwindcss/vite';
5+
import path from 'path';
6+
7+
import cloudflare from '@astrojs/cloudflare';
58

69
// https://astro.build/config
710
export default defineConfig({
@@ -30,7 +33,15 @@ export default defineConfig({
3033
],
3134
}),
3235
],
36+
3337
vite: {
3438
plugins: [tailwindcss()],
39+
resolve: {
40+
alias: {
41+
'@example': path.resolve('../example'),
42+
},
43+
},
3544
},
45+
46+
adapter: cloudflare(),
3647
});

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"astro": "astro"
1111
},
1212
"dependencies": {
13+
"@astrojs/cloudflare": "^12.6.0",
1314
"@astrojs/starlight": "^0.34.4",
1415
"@astrojs/starlight-tailwind": "^4.0.1",
1516
"@fontsource/ibm-plex-serif": "^5.2.6",

docs/src/content/docs/examples/apple.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ head:
77
---
88

99
import { Code } from '@astrojs/starlight/components';
10-
import appleCodeStyle from '../example/src/examples/apple.tsx?raw';
10+
import appleCodeStyle from '@example/src/examples/apple.tsx?raw';
1111

12-
import appleCodeNativeWind from '../example/src/examples/apple-nativewind.tsx?raw';
12+
import appleCodeNativeWind from '@example/src/examples/apple-nativewind.tsx?raw';
1313

1414
## Using Nativewind
1515

docs/src/content/docs/examples/dashed.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ head:
77
---
88

99
import { Code } from '@astrojs/starlight/components';
10-
import dashedCodeStyle from '../example/src/examples/dashed.tsx?raw';
10+
import dashedCodeStyle from '@example/src/examples/dashed.tsx?raw';
1111

12-
import dashedCodeNativeWind from '../example/src/examples/dashed-nativewind.tsx?raw';
12+
import dashedCodeNativeWind from '@example/src/examples/dashed-nativewind.tsx?raw';
1313

1414
## Using Nativewind
1515

docs/src/content/docs/examples/revolt.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ head:
77
---
88

99
import { Code } from '@astrojs/starlight/components';
10-
import revoltCodeStyle from '../example/src/examples/revolt.tsx?raw';
10+
import revoltCodeStyle from '@example/src/examples/revolt.tsx?raw';
1111

12-
import revoltCodeNativeWind from '../example/src/examples/revolt-nativewind.tsx?raw';
12+
import revoltCodeNativeWind from '@example/src/examples/revolt-nativewind.tsx?raw';
1313

1414
## Using Nativewind
1515

docs/src/content/docs/examples/stripe.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ head:
77
---
88

99
import { Code } from '@astrojs/starlight/components';
10-
import stripCodeStyle from '../example/src/examples/stripe.tsx?raw';
10+
import stripCodeStyle from '@example/src/examples/stripe.tsx?raw';
1111

12-
import stripCodeNativeWind from '../example/src/examples/stripe-nativewind.tsx?raw';
12+
import stripCodeNativeWind from '@example/src/examples/stripe-nativewind.tsx?raw';
1313

1414
## Using Nativewind
1515

docs/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"extends": "astro/tsconfigs/strict",
33
"include": [".astro/types.d.ts", "**/*"],
4-
"exclude": ["dist"]
4+
"exclude": ["dist"],
5+
"compilerOptions": {
6+
"paths": {
7+
"@example/*": ["../example/*"]
8+
}
9+
}
510
}

0 commit comments

Comments
 (0)