This repository was archived by the owner on Aug 20, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathastro.config.mjs
More file actions
74 lines (71 loc) · 2.55 KB
/
Copy pathastro.config.mjs
File metadata and controls
74 lines (71 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import node from '@astrojs/node'
import react from '@astrojs/react'
import starlight from '@astrojs/starlight'
import { ExpressiveCodeTheme } from '@astrojs/starlight/expressive-code'
import { defineConfig } from 'astro/config'
import fs from 'node:fs'
import { loadEnv } from 'vite'
const { PUBLIC_WEB_URL } = loadEnv(import.meta.env.MODE, process.cwd(), '')
const jsonDarkString = fs.readFileSync(
new URL(`src/assets/themes/daytona-code-dark.json`, import.meta.url),
'utf-8'
)
const jsonLightString = fs.readFileSync(
new URL(`src/assets/themes/daytona-code-light.json`, import.meta.url),
'utf-8'
)
const myThemeDark = ExpressiveCodeTheme.fromJSONString(jsonDarkString)
const myThemeLight = ExpressiveCodeTheme.fromJSONString(jsonLightString)
// https://astro.build/config
export default defineConfig({
site: PUBLIC_WEB_URL,
base: '/docs',
integrations: [
react(),
starlight({
favicon: '/favicon.ico',
title: 'Daytona',
social: {
github: 'https://github.com/daytonaio',
},
editLink: {
baseUrl: 'https://github.com/daytonaio/docs/blob/main/',
},
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 4 },
customCss: ['./src/fonts/font-face.css', './src/styles/style.scss'],
components: {
Footer: './src/components/Footer.astro',
MarkdownContent: './src/components/MarkdownContent.astro',
Pagination: './src/components/Pagination.astro',
Header: './src/components/Header.astro',
PageSidebar: './src/components/PageSidebar.astro',
PageFrame: './src/components/PageFrame.astro',
Sidebar: './src/components/Sidebar.astro',
TwoColumnContent: './src/components/TwoColumnContent.astro',
TableOfContents: './src/components/TableOfContents.astro',
MobileMenuToggle: './src/components/MobileMenuToggle.astro',
ContentPanel: './src/components/ContentPanel.astro',
PageTitle: './src/components/PageTitle.astro',
Hero: './src/components/Hero.astro',
ThemeProvider: './src/components/ThemeProvider.astro',
ThemeSelect: './src/components/ThemeSelect.astro',
Head: './src/components/Head.astro',
EditLink: './src/components/EditLink.astro',
ExploreMore: './src/components/ExploreMore.astro',
},
expressiveCode: {
minSyntaxHighlightingColorContrast: 0,
themes: [myThemeDark, myThemeLight],
},
}),
],
output: 'hybrid',
adapter: node({
mode: 'middleware',
}),
vite: {
ssr: {
noExternal: ['path-to-regexp'],
},
},
})