generated from freeCodeCamp/template
-
-
Notifications
You must be signed in to change notification settings - Fork 338
Expand file tree
/
Copy pathastro.config.ts
More file actions
56 lines (54 loc) · 1.63 KB
/
astro.config.ts
File metadata and controls
56 lines (54 loc) · 1.63 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
import { defineConfig } from 'astro/config';
import tailwindcss from '@tailwindcss/vite';
import starlight from '@astrojs/starlight';
import starlightScrollToTop from 'starlight-scroll-to-top';
import starlightLinksValidator from 'starlight-links-validator';
import sidebar from './src/sidebar';
const config = defineConfig({
// @ts-expect-error - Vite 6/7 plugin type incompatibility: Astro 5 uses Vite 6, @tailwindcss/vite 4.1.14 uses Vite 7
vite: { plugins: [tailwindcss()] },
site: 'https://contribute.freecodecamp.org',
integrations: [
starlight({
title: 'Contribute | freeCodeCamp.org',
description: 'Contribute to freeCodeCamp.org',
logo: {
light: './public/icons/secondary_logo.svg',
dark: './public/icons/primary_logo.svg',
replacesTitle: true
},
favicon: 'favicon.ico',
tableOfContents: {
minHeadingLevel: 1,
maxHeadingLevel: 2
},
editLink: {
baseUrl: 'https://github.com/freeCodeCamp/contribute/edit/main/'
},
social: [
{
label: 'GitHub',
href: 'https://github.com/freeCodeCamp',
icon: 'github'
},
{
label: 'Twitter',
href: 'https://twitter.com/freeCodeCamp',
icon: 'twitter'
},
{
label: 'Discord',
href: 'https://chat.freecodecamp.org',
icon: 'discord'
}
],
sidebar: sidebar,
plugins: [
...(process.env.CHECK_LINKS ? [starlightLinksValidator()] : []),
starlightScrollToTop()
],
customCss: ['./src/styles/global.css']
})
]
});
export default config;