-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
42 lines (41 loc) · 1.51 KB
/
astro.config.mjs
File metadata and controls
42 lines (41 loc) · 1.51 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
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import node from '@astrojs/node'; // Node.js adapter import
export default defineConfig({
output: 'server', // Server-side output configuration
adapter: node({
mode: 'standalone', // Running mode setting
}),
server: {
host: '0.0.0.0', // Server host address
port: 4321, // Server port
cors: true, // Enable CORS
},
prefetch: {
prefetchAll: false, // Disable prefetching for all routes
defaultStrategy: 'viewport', // Prefetch strategy based on viewport
},
experimental: {
serverIslands: true, // Enable server-side islands
clientPrerender: false, // Disable client-side prerendering
},
integrations: [
starlight({
title: 'Documentation', // Documentation title
description: 'General Project Documentation', // General project description
prerender: false, // Disable prerendering for pages
// logo: null,
// favicon: null,
// customCss: [],
// social: {},
components: {
Sidebar: './src/components/Sidebar.astro', // Custom Sidebar component
PageSidebar: './src/components/PageSidebar.astro', // Custom Page Sidebar component
Pagination: './src/components/Pagination.astro', // Custom Pagination component
Search: './src/components/Search.astro', // Custom Search component
},
defaultLocale: 'en', // Default locale setting
}),
],
middleware: './src/middleware.ts', // Path to custom middleware
});