-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathastro.config.ts
More file actions
123 lines (108 loc) · 3.3 KB
/
astro.config.ts
File metadata and controls
123 lines (108 loc) · 3.3 KB
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
import { defineConfig } from "astro/config";
import catppuccin from "@catppuccin/starlight";
import starlight from "@astrojs/starlight";
import { optionsData } from "./docs/data/options";
const starlightTitle = "catppuccin/nix";
const moduleTypeToNiceLabel = (type: string) => {
switch (type) {
case "nixos":
return "NixOS";
case "home":
return "home-manager";
default:
return type;
}
};
const rollingVersion = "main";
const latestStableVersion = "25.11";
export default defineConfig({
site: process.env.URL || "https://nix.catppuccin.com",
srcDir: "./docs",
publicDir: "./docs/public",
integrations: [
starlight({
title: starlightTitle,
logo: {
src: "./assets/logo.png",
},
editLink: {
baseUrl: "https://github.com/catppuccin/nix/edit/main/",
},
sidebar: [
{
label: starlightTitle,
slug: "",
},
{
label: "Getting Started",
autogenerate: { directory: "Getting Started" },
},
{
label: "Options List",
items: Object.entries(optionsData).map(([version, modules]) => {
const versionGroup = {
label: version,
collapsed: version != rollingVersion,
items: Object.entries(modules).map(([type, options]) => {
return {
label: moduleTypeToNiceLabel(type),
collapsed: true,
items: Object.keys(options).map((module) => {
return {
label: module,
link: `/options/${version}/${type}/${module}`,
};
}),
};
}),
};
// Apply "new" badge to latest stable release
return version == latestStableVersion
? { ...versionGroup, badge: "New" }
: versionGroup;
}),
},
{
label: "Frequently Asked Questions",
link: "/faq",
},
{
label: "Changelog",
link: "/changelog",
},
"contributing",
],
social: [
{
icon: "github",
label: "GitHub",
href: "https://github.com/catppuccin/nix",
},
{
icon: "discord",
label: "Discord",
href: "https://discord.com/servers/907385605422448742",
},
],
// Catppuccin-ified code blocks!
// Sourced from https://github.com/catppuccin/starlight/blob/e8e4bbf83541e6dc95c89b17df844b3c2c472103/apps/docs/astro.config.ts#L23-L36
// TODO(@getchoo): Stop vendoring this if/when we can
expressiveCode: {
themes: ["catppuccin-mocha", "catppuccin-latte"],
styleOverrides: {
textMarkers: {
insBackground:
"color-mix(in oklab, var(--sl-color-green-high) 25%, var(--sl-color-gray-6));",
insBorderColor: "var(--sl-color-gray-5)",
delBackground:
"color-mix(in oklab, var(--sl-color-red-high) 25%, var(--sl-color-gray-6));",
delBorderColor: "var(--sl-color-gray-5)",
},
codeBackground: "var(--sl-color-gray-6)",
},
},
favicon: "./favicon.png",
plugins: [catppuccin()],
}),
],
});