Back to templates

Template details

Ky's Astro Starter

Blank Astro project with Biome, reset.css, pnpm, and pre-commit checks.

About this template

Ky's Astro Starter is a boilerplate Astro project that provides a pre-configured foundation for building static websites with TypeScript, pnpm, Biome, and pre-commit hooks out of the box.

What is Ky's Astro Starter?

Ky's Astro Starter is a blank Astro project template with TypeScript enabled and pnpm as the package manager. It comes with a BaseLayout component that includes meta tags, Open Graph tags, smartypants smart quotes, and a site-name suffix on page titles. The project is set up with Biome for linting and formatting, Josh Comeau's reset.css for styling, and Astro Sitemap for generating sitemaps. It is designed for developers who want a minimal yet opinionated starting point for Astro sites.

Key Features

  • TypeScript by default — The Astro project is bootstrapped with TypeScript, so type checking works immediately.
  • pnpm package manager — Dependencies are managed with pnpm, which is fast and disk-efficient.
  • Import aliases — Use the ~ alias to import from src, e.g. import { Component } from '~/components'.
  • Pre-configured BaseLayout — Includes basic meta tags, Open Graph tags, smartypants smart quotes, and automatic "Page Title · Site Name" formatting.
  • Biome linting and formatting — Run pnpm check to execute Astro check plus Biome lint and format, or pnpm check:fix to auto-fix issues.
  • VS Code experience — Format on save and paste, default formatter set to Astro, and recommended workspace extensions for Astro, axe Accessibility Linter, and Biome.
  • Pre-commit checks — simple-git-hooks and nano-staged run biome check --write and optimo to format/compress images and videos before every commit.
  • Dependabot automation — Weekly dependency updates, with GitHub Action and minor/patch updates grouped into single PRs, and major updates as individual PRs.

Who is it for?

Ky's Astro Starter is for developers who want to start a new Astro project without spending time setting up tooling. It suits teams that standardize on pnpm and Biome for consistency, as well as individuals who prefer an opinionated, minimal setup with sensible defaults for performance and accessibility.

What can you do with it?

  • Developers — Scaffold a new Astro site with all the boilerplate configuration already handled, then focus on building components and pages.
  • Teams — Enforce consistent code style through Biome and pre-commit hooks, and keep dependencies updated automatically via Dependabot.
  • Static site owners — Generate a sitemap automatically with Astro Sitemap, enable link prefetching, and start with an accessibility-oriented VS Code linter.

How does it work?

  1. Click "Use this template" to create a new repository from the template.
  2. Update the site field in astro.config.mjs from https://mysite.com to your site URL.
  3. Update siteName in src/layouts/BaseLayout.astro.
  4. The project is then ready to develop, lint, and build.

FAQ

Is Ky's Astro Starter free?

Yes, it's a public GitHub template that you can use for personal or commercial projects without cost. You can create a new repository with one click and keep your own copy.

What does the template include?

It includes a blank Astro project with TypeScript, pnpm, Biome, simple-git-hooks, nano-staged, optimo, Astro Sitemap, a BaseLayout with meta/OG tags, and VS Code settings/recommendations.

How do I add new pages?

Create new .astro files in the src/pages directory. The template uses Astro's file-based routing, so each file becomes a route automatically.