-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathastro.config.mjs
158 lines (151 loc) · 3.42 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import 'dotenv/config'
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
import tailwind from '@astrojs/tailwind'
// SEE: https://developers.google.com/analytics/devguides/collection/gtagjs
const gaTrackingID = process.env.GA_TRACKING_ID
const gaSrc = `https://www.googletagmanager.com/gtag/js?id=${gaTrackingID}`
// SEE: https://plausible.io/docs/plausible-script
const plausibleDomain = process.env.PLAUSIBLE_DOMAIN
const plausibleSrc =
process.env.PLAUSIBLE_SRC || 'https://plausible.io/js/script.js'
const head = []
if (gaTrackingID) {
head.push(
{
tag: 'script',
attrs: {
src: gaSrc,
async: true,
},
},
{
tag: 'script',
content: `
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${gaTrackingID}');
`,
},
)
}
if (plausibleDomain && plausibleSrc) {
head.push({
tag: 'script',
attrs: {
src: plausibleSrc,
'data-domain': plausibleDomain,
defer: true,
},
})
}
head.push(
{
tag: 'link',
attrs: {
rel: 'apple-touch-icon',
href: '/apple-touch-icon.png',
sizes: '180x180',
},
},
{
tag: 'link',
attrs: {
rel: 'icon',
type: 'image/png',
href: '/favicon-32x32.png',
sizes: '32x32',
},
},
{
tag: 'link',
attrs: {
rel: 'icon',
type: 'image/png',
href: '/favicon-16x16.png',
sizes: '16x16',
},
},
{
tag: 'link',
attrs: {
rel: 'manifest',
href: '/site.webmanifest',
},
},
{
tag: 'link',
attrs: {
rel: 'mask-icon',
href: '/safari-pinned-tab.svg',
color: '#7cc6fe',
},
},
{
tag: 'meta',
attrs: {
name: 'msapplication-TileColor',
content: '#7cc6fe',
},
},
{
tag: 'meta',
attrs: {
name: 'theme-color',
content: '#bee1ff',
},
},
)
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'grlx Docs',
lastUpdated: true,
description:
'Documentation for grlx. Fleet configuration management that is low overhead, dependency free, and easy to install.',
components: {
Footer: './src/components/AdatomicFooter.astro',
},
customCss: ['./src/tailwind.css', './src/custom.css'],
defaultLocale: 'root',
locales: {
root: {
label: 'English',
lang: 'en', // lang is required for root locales
},
},
favicon: '/favicon.ico',
head,
logo: { src: './src/assets/grlx.webp' },
social: {
github: 'https://github.com/gogrlx/grlx',
'x.com': 'https://x.com/gogrlx',
discord: 'https://discord.gg/RNsZ3KWjXm',
email: 'mailto:grlx@adatomic.com?subject=Question'
},
sidebar: [
{ label: 'Getting Started', link: '/getting-started' },
{
label: 'Architecture',
autogenerate: { directory: 'architecture' },
},
{
label: 'Ingredients',
autogenerate: { directory: 'ingredients' },
},
{
label: 'Recipes',
autogenerate: { directory: 'recipes' },
},
{label: 'Glossary', link: '/glossary'},
],
}),
tailwind({
// Disable the default base styles:
applyBaseStyles: false,
}),
],
site: 'https://docs.grlx.dev',
})