-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsites.js
More file actions
79 lines (77 loc) · 2.5 KB
/
Copy pathsites.js
File metadata and controls
79 lines (77 loc) · 2.5 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
/**
* Canonical registry of the gstack sites.
*
* This is the single source of truth for the cross-site switcher, the per-tool
* accent, and the public URL of each site. Adding a fifth tool to the family is
* one entry here plus one `gstackTheme({ tool })` call in its docs config —
* nothing else in the theme is per-tool.
*
* Accents differ between colour modes because the Datasheet palette puts them
* on near-black in dark and on warm paper in light; a single hex cannot clear
* contrast in both.
*
* @typedef {object} Site
* @property {string} id Stable id, matches the binary name.
* @property {string} glyph Single character for the header mark. Explicit
* rather than derived — gdash and gdiff share a
* second letter.
* @property {string} label Display label in the switcher.
* @property {string} url Public origin, no trailing slash.
* @property {string} github `owner/repo` on GitHub.
* @property {string} tagline One line, used in meta description fallbacks.
* @property {{dark: string, light: string}} accent
*/
/** @type {Site[]} */
export const SITES = [
{
id: "gstack",
glyph: "◈",
label: "gstack",
url: "https://gstack.techquests.dev",
github: "techquestsdev/gstack",
tagline: "A stack of terminal git tools that share one keymap.",
accent: { dark: "#3ddc97", light: "#0f8f63" },
},
{
id: "gdash",
glyph: "▦",
label: "gdash",
url: "https://gdash.techquests.dev",
github: "techquestsdev/gdash",
tagline:
"A rich terminal UI for GitHub & GitLab that doesn't break your flow.",
accent: { dark: "#5fa3e8", light: "#1f6cb0" },
},
{
id: "gtrack",
glyph: "◷",
label: "gtrack",
url: "https://gtrack.techquests.dev",
github: "techquestsdev/gtrack",
tagline:
"A blazingly fast terminal UI for CI — GitHub Actions and GitLab pipelines.",
accent: { dark: "#e2a851", light: "#9a6414" },
},
{
id: "gdiff",
glyph: "�",
label: "gdiff",
url: "https://gdiff.techquests.dev",
github: "techquestsdev/gdiff",
tagline: "A git diff pager with a file tree, à la GitHub.",
accent: { dark: "#c79bf0", light: "#7b46a8" },
},
];
/**
* @param {string} id
* @returns {Site}
*/
export function getSite(id) {
const site = SITES.find((s) => s.id === id);
if (!site) {
throw new Error(
`[starlight-gstack] Unknown tool "${id}". Known tools: ${SITES.map((s) => s.id).join(", ")}.`,
);
}
return site;
}