$_ Terminal Docs

Customization

Terminal Docs ships with 8 color scheme presets inspired by popular terminal themes. You can switch between them, modify them, or create your own.

Built-in Themes

ThemeStyleAccent Color
DefaultClean, modernBlue
NordArctic, coolFrost blue
DraculaDark, vibrantPurple
CatppuccinPastel, warmMauve
GruvboxRetro, earthyYellow
SolarizedPrecision, balancedBlue
Tokyo NightFuturistic, smoothBlue-purple
One DarkClassic, comfortableBlue

Each theme has both light and dark variants. The dark mode toggle works independently — pick any theme and toggle dark mode separately.

How Themes Work

Themes use CSS custom properties (variables). Each theme file in src/styles/themes/ defines a set of color tokens:

:root[data-theme="nord"].dark {
  --td-bg: #2e3440;
  --td-bg-alt: #3b4252;
  --td-bg-code: #242933;
  --td-text: #eceff4;
  --td-text-muted: #d8dee9;
  --td-border: #434c5e;
  --td-accent: #88c0d0;
  --td-accent-hover: #8fbcbb;
  --td-success: #a3be8c;
  --td-warning: #ebcb8b;
  --td-error: #bf616a;
  --td-info: #81a1c1;
}

Creating a Custom Theme

  1. Copy an existing theme file, e.g., src/styles/themes/nord.css
  2. Rename it to your theme name, e.g., my-theme.css
  3. Update the selector: :root[data-theme="my-theme"]
  4. Change the color values
  5. Import it in src/styles/global.css:
@import "./themes/my-theme.css";
  1. Add it to the theme switcher in src/data/themes.ts:
{ id: "my-theme", name: "My Theme", preview: ["#bg", "#accent", "#text"] }

CSS Variable Reference

VariableUsage
--td-bgPage background
--td-bg-altAlternate sections, sidebar
--td-bg-codeCode block background
--td-textPrimary text color
--td-text-mutedSecondary/muted text
--td-borderBorders, dividers
--td-accentLinks, buttons, active states
--td-accent-hoverAccent hover state
--td-successSuccess indicators
--td-warningWarning indicators
--td-errorError indicators
--td-infoInfo indicators

Using Theme Colors in Tailwind

Theme colors are mapped to Tailwind via @theme in global.css. Use them with standard utility classes:

<div class="bg-td-bg text-td-text border-td-border">
  <span class="text-td-accent">Themed content</span>
</div>

Customizing the Site

Site Name and Metadata

Edit the component files directly:

  • Site name: src/components/Header.astro and src/components/Footer.astro
  • SEO defaults: src/components/SEOHead.astro
  • GitHub URL: Update links in Header and Footer

Header navigation links are defined in src/components/Header.astro. The sidebar is automatically generated from your content collection structure.

Fonts

Fonts are loaded in src/layouts/BaseLayout.astro. The defaults are:

  • Body: Inter
  • Code: JetBrains Mono

Replace the Google Fonts link to use your preferred typefaces.

Was this page helpful?

Give Feedback