1
+ import sitemap from "@astrojs/sitemap" ;
1
2
import starlight from "@astrojs/starlight" ;
2
3
import tailwind from "@astrojs/tailwind" ;
3
4
// @ts -check
4
5
import { defineConfig , passthroughImageService } from "astro/config" ;
5
- import { fetchStories , storybookLoader } from "./src/storybook-loader.ts" ;
6
- // No access to `getCollection` here, use loader
6
+ import { fetchStories } from "./src/storybook-loader.ts" ;
7
+
8
+ const PUBLIC_DOC_SITE_URL = "https://ddev-storybook.geist.network" ;
7
9
8
- // sidebar use docs collection as default, model as external link
9
10
export const getSidebarComponentsSlugs = async ( ) => {
10
11
const entries = await fetchStories ( ) ;
11
12
// Group entries by their title parts
@@ -22,6 +23,7 @@ export const getSidebarComponentsSlugs = async () => {
22
23
23
24
acc [ group ] [ subgroup ] . push ( {
24
25
label : name ,
26
+ // model as external link as slug only applicable to doc
25
27
link : `/component/${ id } ` ,
26
28
} ) ;
27
29
@@ -42,6 +44,7 @@ const components = await getSidebarComponentsSlugs();
42
44
43
45
// https://astro.build/config
44
46
export default defineConfig ( {
47
+ site : PUBLIC_DOC_SITE_URL ,
45
48
integrations : [
46
49
starlight ( {
47
50
title : "dDevKit" ,
@@ -76,14 +79,12 @@ export default defineConfig({
76
79
] ,
77
80
favicon : "/favicon.svg" ,
78
81
} ) ,
82
+ sitemap ( ) ,
79
83
tailwind ( {
80
84
// Disable the default base styles:
81
85
applyBaseStyles : true ,
82
86
} ) ,
83
87
] ,
84
- // adapter: cloudflare({
85
- // imageService: "cloudflare",
86
- // }),
87
88
image : {
88
89
service : passthroughImageService ( ) ,
89
90
} ,
0 commit comments