Skip to content
H Hans Martens
astro-rocket configuration customization themes

Astro Rocket Configuration — Every Toggle, Theme, and Layout Option Explained

A complete walkthrough of Astro Rocket's configuration options: 13 colour themes, OKLCH colours, typography, radius and shadow tokens, header styles, dark mode, and more.

H

Hans Martens

2 min read

Astro Rocket ships configured with sensible defaults. This post documents every meaningful option you can change — what it does, where to find it, and what value to set.

The main config file

Almost everything lives in src/config/site.config.ts. Open it and you’ll see the full siteConfig object. The fields you’re most likely to change:

name: 'Your Site Name',          // Logo, titles, footer copyright
description: 'Short description', // Default meta description
url: 'https://yoursite.com',     // Canonical URLs and sitemap
author: 'Your Name',
email: 'hello@yoursite.com',

The name field is not cosmetic only — it feeds into structured data, Open Graph tags, and the auto-generated favicon and logo badge. Set it accurately from the start.

Full site config reference

All fields available in src/config/site.config.ts:

FieldTypeRequiredWhat it does
namestringSite name — appears in logo, page titles, copyright, and structured data
descriptionstringDefault meta description used on pages without their own
urlstringCanonical base URL — used in sitemap, OG tags, and JSON-LD
ogImagestringPath to the default fallback OG image
authorstringAuthor name for blog posts and Person schema
emailstringContact email — used in structured data and the contact form
phonestringPhone number for structured data (local business schema)
addressobjectPhysical address for structured data — street, city, state, zip, country
authorImagestringPath to author avatar (e.g. '/avatar.jpg') — used in Person schema
socialLinksstring[]Social profile URLs — icons resolved automatically
twitter.sitestringTwitter site handle — populates twitter:site meta tag
twitter.creatorstringTwitter creator handle — populates twitter:creator meta tag
verification.googlestringGoogle Search Console verification code
verification.bingstringBing Webmaster verification code
blogImageOverlaybooleanBrand-colour tint over blog cover images (default: true)
branding.logo.altstringAccessible alt text for the logo
branding.logo.imageUrlstringPath to a PNG logo — used in Organization schema for rich results
branding.favicon.svgstringPath to favicon SVG in public/
branding.colors.themeColorhexBrowser toolbar colour on mobile Chrome/Safari
branding.colors.backgroundColorhexPWA splash screen background colour

The phone and address fields are optional but improve local business structured data — relevant if you’re building a site for a business with a physical location. Leave them empty or remove them for a personal site.

Boolean switches

Blog image overlay

// src/config/site.config.ts
blogImageOverlay: true,

When true, a translucent brand-colour tint is applied over blog cover images. This helps images blend with your theme if they have neutral or mismatched colours. Set it to false if your images are already on-brand or if you prefer photographs to appear unaltered.

Dark mode default

The default mode is set directly in the HTML element in src/layouts/BaseLayout.astro:

<html lang="en" class="scroll-smooth dark" data-theme="blue">

The dark class is what activates dark mode on first load. Remove it to default to light:

<html lang="en" class="scroll-smooth" data-theme="blue">

The user’s preference during their session is stored in sessionStorage — so it persists while the tab is open but resets when they open a new tab. This is intentional for a portfolio or marketing site. If you want it to persist across sessions, swap the sessionStorage calls for localStorage in the same file.

Structured data: schema switches

The landing page (src/pages/index.astro) passes three boolean props to LandingLayout that control which JSON-LD schemas are injected into the page <head>:

<LandingLayout
  includePersonSchema={true}
  includeOrgSchema={false}
  includeProfessionalServiceSchema={false}
>
PropDefaultWhat it adds
includePersonSchemafalsePerson schema — name, job title, email, social profiles, author image
includeOrgSchemafalseOrganization schema — name, URL, logo, contact email
includeProfessionalServiceSchemafalseProfessionalService schema — adds address, opening hours, area served

Enable includePersonSchema for a personal portfolio. Enable includeOrgSchema if the site represents a company. Enable includeProfessionalServiceSchema only if you have a physical address set in site.config.ts — search engines will show it in local results.

SEO: noindex and nofollow

Any page layout accepts noindex and nofollow props that are passed through to the <meta name="robots"> tag:

<PageLayout noindex={true} nofollow={false}>
PropDefaultWhat it does
noindexfalseTells search engines not to index the page
nofollowfalseTells search engines not to follow outbound links

Use noindex on pages you don’t want in search results (thank-you pages, internal preview pages, staging environments). Leave both at false for all public content.

Branding: favicon and browser colours

The favicon is auto-generated from the first letter of siteConfig.name and the active --brand-500 colour — it updates live when the theme changes. No image file is needed. To replace it with a custom SVG, drop your file into public/ and update the path:

// src/config/site.config.ts
branding: {
  favicon: {
    svg: '/my-logo.svg',   // replaces the auto-generated monogram
  },
  colors: {
    themeColor: '#1d4ed8',     // browser toolbar colour on mobile (use your brand hex)
    backgroundColor: '#ffffff', // PWA splash screen background
  },
}

themeColor is the colour shown in Chrome’s address bar and Safari’s status bar on mobile — set it to your brand colour for a polished native-app feel.

For structured data (Google rich results), you can also supply a static logo image:

branding: {
  logo: {
    alt: 'My Company',
    imageUrl: '/logo.png',  // add a PNG to public/ and point here
  },
}

Colour themes

Astro Rocket ships with 13 colour themes. Six are shown as coloured bulbs in the header via the ThemeSelector component. Clicking a bulb switches the active theme instantly — no file edits, no rebuild. The logo badge, blog image gradients, and every brand colour on the page update live together.

Changing the active theme

The default theme is set with data-theme on the <html> element in src/layouts/BaseLayout.astro:

data-theme="blue"

Available values — all 13 themes:

ValueHueBest forIn selector
emerald160°All-rounder — works for SaaS, portfolios, and organic brands
teal190°Developer tooling, modern SaaS, trustworthy services
cyan200°Fresh, vibrant tech — more energetic than teal
sky222°Clean and airy — between teal and blue, great for services
blue255°Studio aesthetic (Linear/Raycast feel), authoritative — the default
purple292°Expressive, personality-forward, vivid
lime130°Dev tools, high-energy product sites (Vercel/Linear aesthetic)
amber75°Editorial, luxury, food, warm creative brands
green155°Deep emerald, Supabase-generation aesthetic
indigo264°Enterprise, productivity tools, serious B2B
magenta330°Creative agencies, bold personal brands — maximum vivid
orange38°Bold and warm — the original Velocity/International Orange
violet277°Creative and premium — sweet spot between indigo and purple

The live theme selector

The six themes marked ✓ appear as colour swatches in the header dropdown (desktop) and in the mobile menu when showThemeSelector is enabled on the <Header> component. The visitor’s choice is saved to localStorage and persists across sessions.

To swap one of the six active swatches for a different theme, open src/components/layout/ThemeSelector.astro and edit the themes array:

const themes = [
  { id: 'emerald', name: 'Emerald', color: 'oklch(62.5% 0.22 160)' },
  { id: 'teal',    name: 'Teal',    color: 'oklch(62.5% 0.22 190)' },
  { id: 'cyan',    name: 'Cyan',    color: 'oklch(65% 0.22 200)'   },
  { id: 'sky',     name: 'Sky',     color: 'oklch(67% 0.21 222)'   },
  { id: 'blue',    name: 'Blue',    color: 'oklch(62.5% 0.22 255)' },
  { id: 'purple',  name: 'Purple',  color: 'oklch(62.5% 0.25 303)' },
];

Replace any entry with one of the seven additional themes. Each has a ready-made CSS file in src/styles/themes/.

Once you’ve settled on your brand colour, you can remove the selector from the header entirely. Open src/layouts/LandingLayout.astro (or whichever layout file shows the selector) and delete the showThemeSelector prop — the coloured bulbs disappear without breaking anything else.

Understanding OKLCH — the three numbers

All colour values in Astro Rocket use the OKLCH colour space: oklch(lightness% chroma hue).

ParameterRangeWhat it means
Lightness0% (black) → 100% (white)How light or dark the colour is
Chroma0 (grey) → ~0.37 (maximum vivid)How saturated the colour is
Hue0–360°The colour angle on the wheel

Common hue landmarks: 0°/360° = red, 38° = orange, 75° = amber, 130° = lime, 155–160° = green, 190–200° = teal/cyan, 222° = sky, 255° = blue, 264° = indigo, 292° = purple, 330° = magenta.

To shift a theme to a completely different colour, you only need to change the hue number across the --brand-50 to --brand-900 scale — keep the lightness and chroma values the same and the whole palette moves together. Use oklch.com to pick visually.

Customising a theme’s brand colour

Every theme is a CSS file in src/styles/themes/. Each file defines the full set of colour tokens for both light and dark mode. Open the relevant file and adjust the --brand-* scale — all ten steps from 50 to 900:

html[data-theme="blue"] {
  --brand-50:  oklch(97.5% 0.02 255);
  --brand-100: oklch(94.8% 0.04 255);
  --brand-200: oklch(87.5% 0.08 255);
  --brand-300: oklch(77.8% 0.14 255);
  --brand-400: oklch(68.5% 0.19 255);
  --brand-500: oklch(62.5% 0.22 255); /* primary accent in light mode */
  --brand-600: oklch(53.2% 0.19 255);
  --brand-700: oklch(45.5% 0.16 255);
  --brand-800: oklch(37.2% 0.13 255);
  --brand-900: oklch(26.5% 0.09 255);
}

To shift to a different colour, replace 255 (blue) with your target hue across all ten lines. That’s the entire change required.

You can also edit the shared brand scale in src/styles/tokens/primitives.css if you want a single consistent palette that isn’t theme-dependent:

:root {
  --brand-500: oklch(62.5% 0.22 255); /* primary brand color */
  /* full --brand-50 to --brand-900 scale */
}

Light mode vs dark mode: which brand step is used

The theme files use different brand steps for light and dark mode:

ContextBrand step usedWhy
Light mode accent (--accent)--brand-500Strong enough on white backgrounds
Dark mode accent (--accent)--brand-400One step lighter — needed on dark backgrounds for contrast
Light mode input focus / ring--brand-500
Dark mode input focus / ring--brand-400

When you customise the brand colour, adjust both steps in each mode’s block. If you only change --brand-500, dark mode accents will still use the old --brand-400 value.

Typography tokens

Each theme file defines the font stack and typographic rhythm for the entire site. You can override any of these per theme:

html[data-theme="blue"] {
  /* Font families */
  --theme-font-sans:    'Manrope Variable', ui-sans-serif, system-ui, sans-serif;
  --theme-font-display: 'Outfit Variable', var(--theme-font-sans);
  --theme-font-mono:    'JetBrains Mono Variable', ui-monospace, monospace;

  /* Typographic rhythm */
  --theme-heading-weight:   700;      /* headings font weight */
  --theme-heading-tracking: -0.02em;  /* letter-spacing on headings */
  --theme-body-leading:     1.6;      /* line-height for body text */
}

All 13 themes currently share the same font stack. To use a custom font, install it in public/fonts/, add a @font-face declaration in src/styles/global.css, and update --theme-font-sans or --theme-font-display in your active theme file.

Border radius tokens

The global roundness of the UI is set per theme with five radius levels:

--theme-radius-sm:   0.25rem;  /* 4px  — badges, small buttons */
--theme-radius-md:   0.375rem; /* 6px  — inputs, cards */
--theme-radius-lg:   0.5rem;   /* 8px  — panels, larger cards */
--theme-radius-xl:   0.625rem; /* 10px — large containers */
--theme-radius-full: 9999px;   /* pill shapes, circular avatars */

To give your site a sharper, more editorial feel, set all values to 0. For a rounder, friendlier look, increase them (e.g. --theme-radius-md: 0.75rem). All components reference these tokens, so a single change cascades across the entire design.

Shadow tokens

Each theme defines four shadow elevation levels, tinted with the theme’s hue:

--theme-shadow-sm  /* subtle depth: cards, list items */
--theme-shadow-md  /* dropdowns, popovers */
--theme-shadow-lg  /* modals, drawers */
--theme-shadow-xl  /* high-emphasis overlays */

In dark mode the shadows use higher opacity (35–55%) and are tinted with the brand hue, so the depth reads naturally against dark backgrounds. To make shadows stronger or more neutral, adjust the opacity values or replace the hue-tinted OKLCH colour with a plain rgba(0,0,0,...).

Inverted sections

The --surface-invert family of tokens controls sections that have a dark background in light mode — the CTA blocks, some hero variants, and any area where you use background="invert" on the Footer or a section component:

--surface-invert:           /* main dark surface background */
--surface-invert-secondary: /* slightly lighter surface */
--surface-invert-tertiary:  /* even lighter layer */
--on-invert:                /* primary text on dark surface */
--on-invert-secondary:      /* secondary text on dark surface */
--on-invert-muted:          /* muted text on dark surface */
--border-invert:            /* border on dark surface */
--border-invert-strong:     /* stronger border on dark surface */

In light mode these default to near-black values (around 10–18% lightness) with a subtle hue tint. In dark mode they become slightly lighter than the main background — providing contrast between sections without the jarring jump of a fully inverted surface.

Creating a new theme

  1. Duplicate any file from src/styles/themes/ as your starting point.
  2. Implement all ~35 semantic tokens for both :root (light) and .dark (dark mode).
  3. Add your new theme file’s import to src/styles/tokens/colors.css.
  4. Add an entry to the themes array in ThemeSelector.astro if you want it in the live picker.

Header: floating capsule vs. fixed bar

Astro Rocket has two header shapes. The landing and marketing layouts use a floating capsule:

<Header shape="floating" variant="transparent" colorScheme="invert" position="fixed" />

The blog and standard page layouts use a full-width bar:

<Header position="fixed" size="lg" />

Switching the blog header to a floating style

Open src/layouts/BlogLayout.astro and find the <Header> line. Change it to:

<Header shape="floating" variant="transparent" position="fixed" />

Switching any page header from floating to a bar

Find the Header component in the relevant layout file and remove shape="floating":

<!-- Before -->
<Header shape="floating" variant="transparent" position="fixed" />

<!-- After -->
<Header position="fixed" size="lg" />

Header prop reference

All Header props and what they do:

PropOptionsDefaultWhat it controls
positionfixed sticky staticfixedWhether the header stays at the top while scrolling
shapebar floatingbarFull-width bar or centred floating capsule
sizesm md lgmdHeader height
variantdefault solid transparentdefaultBackground fill
colorSchemedefault invertdefaultUse inverted colours — for dark hero backgrounds
layoutdefault centered minimaldefaultLogo and nav arrangement
showThemeToggletrue falsetrueDark/light mode toggle button
showThemeSelectortrue falsefalseColour theme swatch picker (desktop dropdown + mobile menu)
showSocialLinkstrue falsefalseSocial icon links (desktop only, reads from siteConfig.socialLinks)
showCtatrue falsetrueCTA button in the header
showMobileMenutrue falsetrueHamburger menu on small screens
showActiveStatetrue falsetrueHighlight for the current page link
hideLogotrue falsefalseHide the logo entirely
showScrollProgresstrue falsefalseThin brand-coloured scroll progress bar on the header edge
scrollProgressPositiontop bottombottomEdge of the header where the progress bar sits — top suits the floating capsule header, bottom suits the solid bar header

Set any prop on the <Header> component in the layout file for the page type you want to adjust.

The footer copyright line reads from the copyright prop. Passing a custom value overrides it:

<Footer copyright="© {year} Your Name. All rights reserved." />

The {year} and {siteName} placeholders are replaced automatically at build time. Without a copyright prop it falls back to the site name from site.config.ts.

The Footer is used in three layout files:

Layout filePages it covers
src/layouts/PageLayout.astroBlog index, about, contact, any standard page
src/layouts/BlogLayout.astroIndividual blog posts
src/layouts/LandingLayout.astroThe landing page

Edit the <Footer> line in whichever file covers the pages you want to change.

<Footer layout="simple" />     <!-- Single row: logo, nav, social, copyright -->
<Footer layout="stacked" />    <!-- Vertically stacked sections -->
<Footer layout="columns" />    <!-- Multi-column link groups -->
<Footer layout="minimal" />    <!-- Copyright line only -->
PropTypeDefaultWhat it controls
layoutsimple stacked columns minimalsimpleOverall footer structure
backgrounddefault secondary invertdefaultFooter background colour
columns2 3 43Number of link columns (only applies with layout="columns")
showSocialbooleantrueSocial media icons
showCopyrightbooleantrueCopyright line
hideLogobooleanfalseHide the footer logo
taglinestringShort tagline shown under the logo
copyrightstringCustom copyright text — supports {year} and {siteName} placeholders

The legalLinks prop adds a row of small links (Privacy Policy, Terms of Service, etc.) alongside the copyright line:

<Footer
  legalLinks={[
    { label: 'Privacy Policy', href: '/privacy' },
    { label: 'Terms of Service', href: '/terms' },
  ]}
/>

The columns layout renders grouped link sections — useful for a site with many pages:

<Footer
  layout="columns"
  columns={3}
  linkGroups={[
    {
      title: 'Product',
      links: [
        { label: 'Features', href: '/features' },
        { label: 'Pricing',  href: '/pricing' },
      ],
    },
    {
      title: 'Company',
      links: [
        { label: 'About',   href: '/about' },
        { label: 'Contact', href: '/contact' },
      ],
    },
  ]}
/>

## Navigation

Edit `src/config/nav.config.ts` to change the header and footer navigation in one place:

```ts
export const navItems: NavItem[] = [
  { label: 'Blog',    href: '/blog',    order: 1 },
  { label: 'About',   href: '/about',   order: 2 },
  { label: 'Contact', href: '/contact', order: 3 },
];

Add, remove, or reorder items freely. Both the header and footer read from this array.

Analytics and verification

Set these in your .env file (copy from .env.example):

# Analytics
PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX   # Google Analytics 4
PUBLIC_GTM_ID=GTM-XXXXXXX               # Google Tag Manager

# Cookie consent
PUBLIC_CONSENT_ENABLED=true             # Show cookie consent banner
PUBLIC_PRIVACY_POLICY_URL=/privacy      # Link in the consent banner

# Search console verification
GOOGLE_SITE_VERIFICATION=your-code
BING_SITE_VERIFICATION=your-code

None of these are required during development. The analytics components simply render nothing if the IDs are absent.

Social links in the footer come from the socialLinks array in src/config/site.config.ts:

socialLinks: [
  'https://github.com/yourname',
  'https://x.com/yourhandle',
  'https://instagram.com/yourname',
],

Remove any URL you don’t use. The footer won’t render an empty social section. Icons are resolved automatically from the URL — GitHub, X, Instagram, LinkedIn, and Bluesky are all recognised out of the box.

Quick reference

WhatWhereKey
Site name, author, emailsrc/config/site.config.tsname, author, email
Phone, addresssrc/config/site.config.tsphone, address
Author avatar (Person schema)src/config/site.config.tsauthorImage
Browser toolbar coloursrc/config/site.config.tsbranding.colors.themeColor
Blog image colour overlaysrc/config/site.config.tsblogImageOverlay: true/false
Social linkssrc/config/site.config.tssocialLinks array
Twitter card handlessrc/config/site.config.tstwitter.site, twitter.creator
Search console verification.env or site.config.tsverification.google/bing
Navigation itemssrc/config/nav.config.tsnavItems array
Default colour themesrc/layouts/BaseLayout.astrodata-theme="blue"
Default dark/light modesrc/layouts/BaseLayout.astroclass="dark" on <html>
JSON-LD schema switchessrc/pages/index.astroincludePersonSchema, includeOrgSchema
noindex / nofollowany layoutnoindex={true}, nofollow={true}
Live theme selector (6 bulbs)src/components/layout/ThemeSelector.astrothemes array
All 13 theme filessrc/styles/themes/One CSS file per theme
Brand colour scale (light & dark)src/styles/themes/*.css--brand-50--brand-900
Typography (fonts, weight, tracking)src/styles/themes/*.css--theme-font-*, --theme-heading-*
Border radius (global roundness)src/styles/themes/*.css--theme-radius-sm/md/lg/xl/full
Shadow elevation levelssrc/styles/themes/*.css--theme-shadow-sm/md/lg/xl
Inverted section colourssrc/styles/themes/*.css--surface-invert, --on-invert
Header shape, positionsrc/layouts/*.astroshape, position props
Header show/hide togglessrc/layouts/*.astroshowThemeToggle, showCta, showSocialLinks, etc.
Footer copyright textsrc/layouts/*.astrocopyright prop
Footer layout & columnssrc/layouts/*.astrolayout, columns props
Footer legal linkssrc/layouts/*.astrolegalLinks array
Analytics IDs.envPUBLIC_GA_MEASUREMENT_ID etc.

If you like Astro Rocket, a star on GitHub helps other developers find it. Takes two seconds.

Back to Blog
Share:

Related Posts

Animations in Astro Rocket — Every Effect Explained

A complete breakdown of every animation built into Astro Rocket — page transitions, scroll-triggered counters, the reactive header, card hovers, and the full micro-animation library.

H Hans Martens
2 min read
astro-rocket animations components customization css

SEO in Astro Rocket: What's Built In and How to Configure It

Astro Rocket handles structured data, Open Graph, canonical URLs, sitemaps, and more out of the box. Here's exactly what ships and where to configure it.

H Hans Martens
2 min read
astro-rocket seo structured-data tutorial configuration

How Astro Rocket's Design System Works — Tokens, Colors, and Dark Mode

Astro Rocket uses a three-tier token architecture with OKLCH colors. Change one value and the entire site updates. Here's how it works and how to make it yours.

H Hans Martens
2 min read
astro-rocket design-system tailwind customization tutorial

Follow along

Stay in the loop — new articles, thoughts, and updates.