Theme documentation
Guides and architecture
How to set up the site, change its look, connect forms and publish it.
Explore by category
Getting started
Requirements, installation, the project layout and the first changes to make.
Explore categoryDesign system
The rules, tokens and shared parts that keep every page looking like one design.
Explore categoryService integrations
How to connect a form service, a newsletter provider and checkout links.
Explore categoryLaunch checklist
What to replace, connect and check before the site goes public.
Explore categoryHow the theme is built
Static pages built with Astro 7 and Tailwind CSS 4. Content is checked against schemas, and a preset sets the design tokens.
- Content collectionsChecked at build
Typed content
The fields at the top of every Markdown file are checked against a schema. A missing or invalid field stops the build with a message.
src/content.config.tsimport { defineCollection } from 'astro:content'; import { glob } from 'astro/loaders'; import { z } from 'astro/zod'; export const docs = defineCollection({ loader: glob({ pattern: '**/[^_]*.md', base: './src/content/docs' }), schema: z.object({ title: z.string().min(1), description: z.string(), category: z.string(), order: z.number().default(100), draft: z.boolean().default(false), }), }); - Search boxNo service
Article filter
Typing in the search box narrows the list of articles. It runs in the browser, with no outside service and no page reload.
src/scripts/filter.tsexport function initFilter(): void { const root = document.querySelector<HTMLElement>('[data-filter]'); const input = root?.querySelector<HTMLInputElement>('[data-filter-input]'); const items = document.querySelectorAll<HTMLElement>('[data-filter-item]'); input?.addEventListener('input', () => { const words = input.value.toLowerCase().split(/\s+/).filter(Boolean); items.forEach((item) => { const text = (item.dataset.filterText ?? '').toLowerCase(); item.hidden = !words.every((word) => text.includes(word)); }); }); } - Theme configurationBuild time
Presets and tokens
A preset sets the accent, surfaces, borders, corners and glow. For any preset or override other than the shipped one, the values are written into each page as CSS custom properties at build time.
src/theme.config.tsexport const themeConfig: ThemeConfig = { preset: 'nightgrid', borders: 'preset', radius: 'preset', buttonShape: 'preset', colors: { primary: 'preset', background: 'preset', }, glow: 'preset', typography: 'preset', };
All documentation
Guides and reference for Nightgrid.
Guides
6 articlesGetting started with Nightgrid
Install the theme, find your way around the project and make the first changes.
Launch checklist
What to replace, connect and check before the site goes public.
Writing content in Markdown
Every text style available in documentation, blog, changelog and legal pages, shown on one page.
Service integrations
How to connect a form service, a newsletter provider and checkout links to the theme.
Analytics and cookie consent
How to add an analytics script, with or without the cookie consent banner.
Deployment and custom domains
How to publish the built site on a static host, serve it from a sub-path on GitHub Pages and connect your own domain.
Architecture
1 articleDesign system
The few rules that keep everything in Nightgrid looking like one design, and where to find the full guide.