-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
astro.config.mjs
109 lines (104 loc) · 3.37 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLinksValidator from 'starlight-links-validator';
/* https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables */
const NETLIFY_PREVIEW_SITE = process.env.CONTEXT !== 'production' && process.env.DEPLOY_PRIME_URL;
const site = NETLIFY_PREVIEW_SITE || 'https://contribute.docs.astro.build/';
// https://astro.build/config
export default defineConfig({
site,
integrations: [
starlight({
plugins: [starlightLinksValidator()],
title: 'Astro Docs Docs (AD²)',
social: {
github: 'https://github.com/withastro/contribute.docs.astro.build'
},
editLink: {
baseUrl: 'https://github.com/withastro/contribute.docs.astro.build/edit/main/'
},
customCss: ["./src/styles/theme.css"],
components: {
Head: './src/starlight-overrides/Head.astro',
},
logo: {
dark: './src/assets/logo-dark.svg',
light: './src/assets/logo-light.svg',
replacesTitle: true,
},
head: [
{
tag: 'script',
attrs: {
src: 'https://cdn.usefathom.com/script.js',
'data-site': 'EZBHTSIG',
defer: true,
},
},
],
sidebar: [
{ label: 'Welcome', link: '/welcome/' },
{
label: "About Doc'ing",
items: [
{ label: 'Why we write docs', link: '/about-docs/why-we-doc/' },
{ label: 'How we write docs', link: '/about-docs/how-we-doc/' },
],
},
{
label: 'First-time Contributors',
items: [
'first-time/about',
'first-time/good-first-contributions',
'first-time/file-an-issue',
'first-time/edit-single-page',
'first-time/larger-contributions',
'first-time/source-content',
'first-time/creating-pull-requests',
'first-time/pr-review-process',
],
},
{
label: 'Docs Syntax Reference',
autogenerate: { directory: 'reference' },
},
{
label: 'Documenting Code Changes',
items: [
{ label: 'About documenting changes', link: '/docs-for-code-changes/about-documenting-code-changes/' },
{ label: 'Patch changes', link: '/docs-for-code-changes/patch-changes/' },
{ label: 'New or updated features', link: '/docs-for-code-changes/new-feature-docs/' },
{ label: 'Experimental features', link: '/docs-for-code-changes/experimental-feature-docs/' },
{ label: 'Error messages', link: '/docs-for-code-changes/error-reference/' },
{ label: 'Changesets', link: '/docs-for-code-changes/changesets/' },
],
},
{
label: 'Contributing Guides',
items: [
{ label: 'Writing and Style Guide', link: '/guides/writing-style/' },
{ label: 'Adding a new Astro + X Guide', link: '/guides/new-third-party-guide/' },
{ label: 'Contributing a Recipe', link: '/guides/recipe-writing/' },
{ label: 'Translating Astro docs', link: '/guides/i18n/' },
{ label: 'Contributing for Hacktoberfest', link: '/guides/hacktoberfest/' },
],
},
{
label: 'Major Upgrade guides',
items: [
{ label: 'About Astro upgrade guides', link: '/upgrade-guides/about/' },
{ label: 'Breaking changes', link: '/upgrade-guides/breaking-changes/' },
],
},
{
label: 'Roles',
autogenerate: { directory: 'roles' },
},
{
label: 'Reviewers',
autogenerate: { directory: 'reviewers' },
},
],
}),
],
});