-
Notifications
You must be signed in to change notification settings - Fork 11
/
astro.config.ts
82 lines (81 loc) · 1.86 KB
/
astro.config.ts
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
75
76
77
78
79
80
81
82
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import cloudflare from '@astrojs/cloudflare';
import starlight from '@astrojs/starlight';
import { defineConfig } from 'astro/config';
export default defineConfig({
site: process.env.DEPLOY_URL ?? 'https://astro-tips.dev',
redirects: {
'/recipes/how-to-add-gsap': '/tips/how-to-add-gsap',
'/contributing': '/#want-to-get-involved',
'/resources/educational': '/external-resources',
},
experimental: {
serverIslands: true,
},
integrations: [
starlight({
title: 'Astro Tips',
logo: {
light: './src/assets/logo-light.svg',
dark: './src/assets/logo-dark.svg',
replacesTitle: true,
},
customCss: ['./src/styles/custom.css'],
head: [
// https://cloud.umami.is/settings/websites/3c868d1b-5f9f-4de1-93c4-a21d4944e596
{
tag: 'script',
attrs: {
defer: true,
src: 'https://cloud.umami.is/script.js',
'data-website-id': '3c868d1b-5f9f-4de1-93c4-a21d4944e596',
},
},
],
social: {
github: 'https://github.com/astrolicious/astro-tips.dev',
discord: 'https://chat.astrolicious.dev/',
},
sidebar: [
{
label: 'Home',
link: '/',
},
{
label: 'Recipes',
autogenerate: {
directory: 'recipes',
},
},
{
label: 'Tips',
autogenerate: {
directory: 'tips',
},
},
{
label: 'External resources',
badge: 'Updated',
link: '/external-resources',
},
],
components: {
PageTitle: './src/components/starlight/PageTitle.astro',
MarkdownContent: './src/components/starlight/MarkdownContent.astro',
},
credits: true,
}),
],
vite: {
resolve: {
alias: {
'~': resolve(dirname(fileURLToPath(import.meta.url)), './src'),
},
},
},
output: 'hybrid',
adapter: cloudflare({
imageService: 'passthrough',
}),
});