forked from thoth-tech/ThothTech-Documentation-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
158 lines (156 loc) · 4.39 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 { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightLinksValidator from 'starlight-links-validator';
import partytown from '@astrojs/partytown';
// https://astro.build/config
export default defineConfig({
integrations: [
partytown({
config: {
forward: ["dataLayer.push", "gtag"], // Forward both for compatibility
},
}),
starlight({
title: "Thoth Tech",
favicon: "/favicon.svg",
head: [
// Google Analytics script tag
{
tag: "script",
attrs: {
type: "text/partytown",
src: 'https://www.googletagmanager.com/gtag/js?id=G-D62C4YT9KZ',
async: true,
},
},
// Google Analytics inline configuration
{
tag: 'script',
type: 'text/partytown',
innerHTML: `
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied',
});
gtag('config', 'G-D62C4YT9KZ');
`,
},
// CookieConsent stylesheet
{
tag: 'link',
attrs: {
rel: 'stylesheet',
href: 'https://cdn.jsdelivr.net/gh/orestbida/[email protected]/dist/cookieconsent.css',
},
},
// CookieConsent configuration script
{
tag: 'script',
attrs: {
type: 'module',
src: '/cookieconsent-config.js', // Ensure this script exists in the `public/` folder
},
},
],
plugins: [
starlightLinksValidator({
errorOnRelativeLinks: true,
}),
],
customCss: ["./src/styles/custom.css"],
social: {
github: "https://github.com/thoth-tech",
},
logo: {
src: "./public/favicon.svg",
},
components: {
// MarkdownContent: "starlight-blog/overrides/MarkdownContent.astro",
// Sidebar: "starlight-blog/overrides/Sidebar.astro",
// ThemeSelect: "starlight-blog/overrides/ThemeSelect.astro",
},
sidebar: [
{
label: "Resources",
collapsed: false,
items: [
{
label: "Introduction",
link: "/resources/introduction"
},
{
label: "Thoth Tech Technology Stack",
link: "/resources/thoth-tech-technology-stack"
},
{
label: "Remote Working Guide",
link: "/resources/remote-working-guide"
},
{
label: "Onboarding Hub",
collapsed: true,
autogenerate: { directory: "Resources/Onboarding Hub" },
},
{
label: "Quality Assurance",
collapsed: true,
autogenerate: { directory: "Resources/Quality Assurance" },
},
{
label: "Frequently Asked Questions (FAQ)",
link: "/resources/faq"
},
],
},
{
label: "Products",
collapsed: false,
items: [
{ label: "Products", link: "/products" },
{
label: "SplashKit",
collapsed: true,
autogenerate: { directory: "Products/SplashKit" },
},
{
label: "OnTrack",
collapsed: true,
autogenerate: { directory: "Products/OnTrack" },
},
{
label: "CourseFlow",
collapsed: true,
autogenerate: { directory: "Products/CourseFlow" },
},
],
},
{
label: "Teams and Contributions",
collapsed: true,
autogenerate: { directory: "Teams and Contributions" },
},
{
label: "Feedback",
collapsed: true,
items: [
{
label: "Feedback Form",
link: "/feedback/feedback-form"
}
],
},
],
}),
],
// Image processing
image: {
service: {
entrypoint: "astro/assets/services/sharp",
},
},
});