forked from Sagit-chu/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
190 lines (189 loc) · 5.15 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
// https://starlight.astro.build/guides/css-and-tailwind/#tailwind-css
import tailwind from "@astrojs/tailwind";
// https://github.com/HiDeoo/starlight-links-validator
import starlightLinksValidator from "starlight-links-validator";
// https://github.com/HiDeoo/starlight-image-zoom
import starlightImageZoom from "starlight-image-zoom";
// https://github.com/HiDeoo/starlight-blog
import starlightBlog from "starlight-blog";
// https://docs.astro.build/en/guides/integrations-guide/sitemap/
import sitemap from "@astrojs/sitemap";
// https://github.com/alextim/astro-lib/tree/main/packages/astro-robots-txt#readme
import robotsTxt from "astro-robots-txt";
// https://github.com/giuseppelt/astro-lottie
import lottie from "astro-integration-lottie";
// https://github.com/risu729/astro-better-image-service
import betterImageService from "astro-better-image-service";
// https://github.com/Playform/Compress
import playformCompress from "@playform/compress";
// Configure global authors here
import { authors } from "./src/content/docs/news/authors";
const site = "https://truecharts.org";
// https://astro.build/config
export default defineConfig({
site: site,
base: "/",
output: "static",
outDir: "build",
cacheDir: ".astro/cache",
trailingSlash: "ignore",
compressHTML: true,
prefetch: {
prefetchAll: true,
},
build: {
output: "directory",
},
experimental: {
contentCollectionCache: false,
},
integrations: [
starlight({
title: "TrueCharts Charts",
customCss: ["./src/tailwind.css"],
tagline: "Awesome Helm Charts",
pagefind: true,
logo: {
src: "./src/assets/with-text.svg",
replacesTitle: true,
},
head: [
{
tag: "script",
attrs: {
src: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9270569596814796",
crossorigin: "anonymous",
defer: true,
},
},
{
tag: "script",
attrs: {
src: "https://www.googletagmanager.com/gtag/js?id=G-Q9NT692BZZ",
defer: true,
},
},
{
tag: "script",
content:
"window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Q9NT692BZZ');",
},
],
tableOfContents: {
maxHeadingLevel: 6,
},
social: {
github: "https://github.com/truecharts",
facebook: "https://www.facebook.com/truecharts",
"x.com": "https://twitter.com/useTrueCharts",
discord: "https://discord.gg/tVsPTHWTtr",
telegram: "https://t.me/s/truecharts",
openCollective: "https://opencollective.com/truecharts",
patreon: "https://patreon.com/truecharts",
},
editLink: {
baseUrl: "https://github.com/truecharts/website/tree/main/",
},
components: {
Header: "./src/components/CustomHeader.astro",
Hero: "./src/components/CustomHero.astro",
},
plugins: [
starlightBlog({
prefix: "news",
title: "TrueCharts News",
postCount: 5,
recentPostCount: 10,
authors: authors,
}),
// Do not put that before starlightBlog
starlightImageZoom(),
starlightLinksValidator({
errorOnRelativeLinks: false,
errorOnFallbackPages: false,
exclude: [
"/s/charts",
"/s/discord",
"/s/fb",
"/s/ghs",
"/s/git",
"/s/oc",
"/s/patreon",
"/s/shop",
"/s/tg",
"/s/twitter",
],
}),
],
sidebar: [
{
label: "General",
collapsed: false,
autogenerate: {
directory: "general",
collapsed: true
},
},
{
label: "Common Chart Options",
collapsed: true,
autogenerate: {
directory: "common",
},
},
{
label: "Guides",
collapsed: true,
autogenerate: {
directory: "guides",
},
},
{
label: "ClusterTool",
collapsed: true,
autogenerate: {
directory: "clustertool",
},
},
{
label: "Charts",
collapsed: true,
autogenerate: {
directory: "charts",
},
},
{
label: "Development",
collapsed: true,
autogenerate: {
directory: "development",
},
},
{
label: "Deprecated",
collapsed: true,
autogenerate: {
directory: "deprecated",
},
},
],
}),
sitemap(),
robotsTxt(),
tailwind({
// Disable the default base styles:
applyBaseStyles: false,
}),
lottie(),
betterImageService(),
playformCompress({
HTML: false,
CSS: true,
JavaScript: true,
Image: true,
SVG: true,
}),
],
});