Skip to content

Repository files navigation

starlight-gstack

The shared Starlight theme for the gstack tool family — gstack, gdash, gtrack, gdiff.

Four separate repos, four separate deploys, one look. A consuming site declares which tool it is; the theme supplies everything else.

Install

pnpm add "starlight-gstack@github:techquestsdev/starlight-gstack#v0.1.0"

Pin a tag. The theme is consumed as a git dependency, so there is no registry and no semver range to resolve — the tag is the version.

Use

// astro.config.mjs
import starlight from "@astrojs/starlight";
import gstackTheme from "starlight-gstack";

export default defineConfig({
  site: "https://gdash.techquests.dev",
  integrations: [
    starlight({
      title: "gdash",
      plugins: [gstackTheme({ tool: "gdash" })],
    }),
  ],
});

That is the whole integration. tool keys into sites.js for the label, public URL, GitHub repo and accent pair.

For type-checking of the virtual module, add to src/env.d.ts:

/// <reference types="starlight-gstack/virtual" />

Options

Option Type Default Description
tool string Required. Must match an id in sites.js.
accent string from registry Override the dark-mode accent.
accentLight string from registry Override the light-mode accent.
switcher boolean true Render the cross-site switcher in the header.
ogImage string /og.png Open Graph image, resolved against the site origin.

The theme

Datasheet — mono body copy, serif display headings, a hairline grid masked in behind the page title, grain, uppercase tracked micro-labels, 2px corners, and one accent colour per tool used as a signal rather than a brand.

Colour lives in styles/tokens.css and maps onto Starlight's own custom properties, so core Starlight components inherit it without being overridden. Structure lives in styles/layout.css.

The single per-site value is --gs-accent, injected into <head> by the plugin. Everything chromatic derives from it with color-mix(), so re-skinning a site is one hex.

Adding a tool to the family

One entry in sites.js, one gstackTheme({ tool }) call in the new site's config. Nothing else in the theme is per-tool.

Notes for contributors

  • Plain JS, no build step. A git dependency with a prepare script is a reliability tax; this package installs and runs as-is.
  • No Tailwind. Components use scoped Astro <style> blocks. Tailwind 4 does not scan node_modules, so a Tailwind-based package would force every consumer to add an @source line — a footgun that only shows up as silently missing styles in production builds.
  • Fonts are self-hosted. Instrument Serif ships as two files split on unicode-range (latin, latin-ext). Do not collapse them into one; the latin-ext subset contains no ASCII.

Licence

MIT. Instrument Serif is SIL OFL 1.1. CommitMono is SIL OFL 1.1.

About

Shared Starlight theme for the gstack tool family — gstack, gdash, gtrack, gdiff.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages