Skip to content

Commit c57ef7a

Browse files
committed
more work
1 parent e721ae4 commit c57ef7a

File tree

1 file changed

+78
-60
lines changed

1 file changed

+78
-60
lines changed

astro.config.mjs

Lines changed: 78 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,65 @@ import { authors } from "./src/content/docs/news/authors";
1313

1414
const site = "https://trueforge.org";
1515

16+
// ───────── Shared Config ─────────
17+
const sharedConfig = {
18+
pagefind: true,
19+
customCss: ["./src/tailwind.css"],
20+
tableOfContents: { maxHeadingLevel: 6 },
21+
logo: { src: "./src/assets/with-text.svg", replacesTitle: true },
22+
editLink: { baseUrl: "https://github.com/trueforge-org/website/tree/main" },
23+
plugins: [
24+
starlightBlog({
25+
prefix: "news",
26+
title: "TrueCharts News",
27+
postCount: 5,
28+
recentPostCount: 10,
29+
authors,
30+
}),
31+
starlightImageZoom(),
32+
starlightLinksValidator({
33+
errorOnRelativeLinks: false,
34+
errorOnFallbackPages: false,
35+
errorOnLocalLinks: false,
36+
exclude: [
37+
"/s/charts",
38+
"/s/discord",
39+
"/s/fb",
40+
"/s/ghs",
41+
"/s/git",
42+
"/s/oc",
43+
"/s/patreon",
44+
"/s/shop",
45+
"/s/tg",
46+
"/s/twitter",
47+
],
48+
}),
49+
],
50+
};
51+
52+
// ───────── Sidebar Config ─────────
53+
const rootSidebar = [
54+
{ label: "Home", autogenerate: { directory: "root/home" } },
55+
{ label: "Overview", autogenerate: { directory: "root/overview" } },
56+
];
57+
58+
const truetechSidebar = [
59+
{ label: "General", autogenerate: { directory: "truetech/general" } },
60+
{ label: "Guides", autogenerate: { directory: "truetech/guides" } },
61+
{ label: "TrueTool", autogenerate: { directory: "truetech/truetool" } },
62+
{ label: "TrueCharts-Common", autogenerate: { directory: "truetech/truecharts-common" } },
63+
{ label: "truecharts", autogenerate: { directory: "truetech/truecharts" } },
64+
];
65+
66+
const gamingforgeSidebar = [
67+
{ label: "GamingForge", autogenerate: { directory: "gamingforge" } },
68+
];
69+
70+
const lifeforgeSidebar = [
71+
{ label: "LifeForge", autogenerate: { directory: "lifeforge" } },
72+
];
73+
74+
// ───────── Astro Config ─────────
1675
export default defineConfig({
1776
site,
1877
base: "/",
@@ -24,84 +83,43 @@ export default defineConfig({
2483
prefetch: { prefetchAll: true },
2584
build: { output: "directory" },
2685
integrations: [
27-
// ───────── TrueTech Docs ─────────
86+
// ───────── Root Site ─────────
87+
starlight({
88+
title: "TrueForge",
89+
tagline: "Awesome Projects Community",
90+
...sharedConfig,
91+
sidebar: rootSidebar,
92+
base: "/",
93+
}),
94+
95+
// ───────── TrueTech ─────────
2896
starlight({
2997
title: "TrueTech Docs",
3098
tagline: "TrueTech Projects",
31-
pagefind: true,
32-
customCss: ["./src/tailwind.css"],
33-
logo: { src: "./src/assets/with-text.svg", replacesTitle: true },
34-
tableOfContents: { maxHeadingLevel: 6 },
35-
editLink: { baseUrl: "https://github.com/trueforge-org/website/tree/main" },
36-
social: {
37-
github: "https://github.com/trueforge-org",
38-
discord: "https://discord.gg/tVsPTHWTtr",
39-
patreon: "https://patreon.com/truecharts",
40-
},
41-
plugins: [
42-
starlightBlog({
43-
prefix: "news",
44-
title: "TrueCharts News",
45-
postCount: 5,
46-
recentPostCount: 10,
47-
authors,
48-
}),
49-
starlightImageZoom(),
50-
starlightLinksValidator({
51-
errorOnRelativeLinks: false,
52-
errorOnFallbackPages: false,
53-
errorOnLocalLinks: false,
54-
exclude: [
55-
"/s/charts",
56-
"/s/discord",
57-
"/s/fb",
58-
"/s/ghs",
59-
"/s/git",
60-
"/s/oc",
61-
"/s/patreon",
62-
"/s/shop",
63-
"/s/tg",
64-
"/s/twitter",
65-
],
66-
}),
67-
],
68-
sidebar: [
69-
{ label: "General", autogenerate: { directory: "truetech/general" } },
70-
{ label: "Guides", autogenerate: { directory: "truetech/guides" } },
71-
{ label: "TrueTool", autogenerate: { directory: "truetech/truetool" } },
72-
{ label: "TrueCharts-Common", autogenerate: { directory: "truetech/truecharts-common" } },
73-
{ label: "truecharts", autogenerate: { directory: "truetech/truecharts" } },
74-
],
99+
...sharedConfig,
100+
sidebar: truetechSidebar,
75101
base: "/truetech/",
76102
}),
77103

78-
// ───────── GamingForge Docs ─────────
104+
// ───────── GamingForge ─────────
79105
starlight({
80106
title: "GamingForge Docs",
81107
tagline: "GamingForge Projects",
82-
pagefind: true,
83-
customCss: ["./src/tailwind.css"],
84-
tableOfContents: { maxHeadingLevel: 6 },
85-
sidebar: [
86-
{ label: "GamingForge", autogenerate: { directory: "gamingforge" } },
87-
],
108+
...sharedConfig,
109+
sidebar: gamingforgeSidebar,
88110
base: "/gamingforge/",
89111
}),
90112

91-
// ───────── LifeForge Docs ─────────
113+
// ───────── LifeForge ─────────
92114
starlight({
93115
title: "LifeForge Docs",
94116
tagline: "LifeForge Projects",
95-
pagefind: true,
96-
customCss: ["./src/tailwind.css"],
97-
tableOfContents: { maxHeadingLevel: 6 },
98-
sidebar: [
99-
{ label: "LifeForge", autogenerate: { directory: "lifeforge" } },
100-
],
117+
...sharedConfig,
118+
sidebar: lifeforgeSidebar,
101119
base: "/lifeforge/",
102120
}),
103121

104-
// ───────── Other integrations ─────────
122+
// ───────── Other Integrations ─────────
105123
sitemap(),
106124
robotsTxt(),
107125
tailwind({ applyBaseStyles: false }),

0 commit comments

Comments
 (0)