forked from delucis/starlight-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
38 lines (36 loc) · 1.06 KB
/
astro.config.mjs
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
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
/* https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables */
const NETLIFY_PREVIEW_SITE = process.env.CONTEXT !== 'production' && process.env.DEPLOY_PRIME_URL;
// https://astro.build/config
export default defineConfig({
site: NETLIFY_PREVIEW_SITE || 'https://starlight-examples.netlify.app/',
trailingSlash: 'always',
integrations: [
starlight({
title: 'Starlight Examples',
description: 'Examples of how to do stuff with Astro Starlight',
social: {
github: 'https://github.com/delucis/starlight-examples',
},
editLink: {
baseUrl: 'https://github.com/delucis/starlight-examples/edit/latest/',
},
lastUpdated: true,
customCss: ['./src/styles.css'],
tableOfContents: false,
sidebar: [
{ slug: 'index', label: 'Home' },
{
label: 'Examples',
autogenerate: { directory: 'examples' },
},
'contributing',
],
credits: true,
components: {
Head: './src/overrides/Head.astro',
},
}),
],
});