🔥 All-Access Pass — $199 USD (Regular $499) · Unlock all 2,836 Astro themes ➔
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
Astro Themes••By Komal Nakrani

Build a Band Website with Astro: Releases, Tour Dates, EPK

Build a band website with Astro: releases and tour dates as content, MusicEvent schema, lazy-loaded audio embeds, a press kit page, and free static hosting.

#Astro#Band Website#Music#Structured Data

To build a band website with Astro, store releases and tour dates as content collections, render a discography and an upcoming shows page from them, load streaming embeds only when a visitor asks to play, add MusicEvent structured data for each show, and publish a press kit page for promoters. A band website built with Astro is static and fast, costs nothing to host, and belongs to you instead of a social platform that changes its rules every year.

The same structure works for a record label: swap “band members” for “artists” and the catalogue becomes the center of the site.

Key Takeaways

  • Fans come for three things: new music, tour dates and merch. Put all three on the home page.
  • Model releases and shows as collections so the discography, tour page and home page share one source.
  • Streaming embeds are heavy. Show a cover and a play button, and load the player on click.
  • Add MusicEvent JSON-LD so search engines can show your upcoming shows.
  • A press kit (EPK) page with bio, photos and contacts saves you a dozen emails per booking.

What a band or label website needs

Social profiles are good for reach, but they’re bad at being a reference. A promoter checking your draw, a journalist looking for a press photo, or a fan looking for the Berlin show date all want one page with the answer.

Page What it covers
Home Latest release, next three shows, mailing list, merch link
Music Every release with cover, tracklist, streaming and purchase links
Release detail Credits, liner notes, formats, embedded player
Tour Upcoming shows with venue, city, date and ticket link
Press Bio in three lengths, press photos, logos, contacts, quotes
About Band story and members, or the label’s roster
Merch Link to your store, or a small product grid

For a label, add an artist roster and a demo submission page with clear rules about what you accept.

Start the project

# Terminal
npm create astro@latest band-site
cd band-site
npx astro add sitemap
npm run dev

Set site in astro.config.mjs to your domain. Short domains work best for bands because people type them from posters and stage banners.

Model releases and shows

Releases are Markdown entries, because they have liner notes and credits. Shows are a single JSON file, because you add and remove them often and they’re mostly data.

// src/content.config.ts
import { defineCollection } from 'astro:content';
import { glob, file } from 'astro/loaders';
import { z } from 'astro/zod';

const releases = defineCollection({
  loader: glob({ pattern: '**/index.md', base: './src/content/releases' }),
  schema: ({ image }) =>
    z.object({
      title: z.string(),
      type: z.enum(['album', 'ep', 'single']),
      releaseDate: z.coerce.date(),
      cover: image(),
      tracks: z.array(z.object({ title: z.string(), length: z.string() })),
      links: z.object({
        bandcamp: z.string().optional(),
        spotify: z.string().optional(),
        apple: z.string().optional(),
      }),
      embed: z.string().optional(),
      formats: z.array(z.string()).default([]),
    }),
});

const shows = defineCollection({
  loader: file('./src/data/shows.json'),
  schema: z.object({
    date: z.coerce.date(),
    venue: z.string(),
    city: z.string(),
    country: z.string(),
    tickets: z.string().optional(),
    soldOut: z.boolean().default(false),
  }),
});

export const collections = { releases, shows };

The shows file is an array of objects, each with an id:

[
  {
    "id": "2027-02-14-berlin",
    "date": "2027-02-14T20:00:00+01:00",
    "venue": "Lido",
    "city": "Berlin",
    "country": "DE",
    "tickets": "https://tickets.example.com/lido-feb-14"
  }
]

Using the date and city as the id keeps entries unique and makes the file easy to scan.

Build the discography

---
// src/pages/music/index.astro
import { getCollection } from 'astro:content';
import { Image } from 'astro:assets';
import Base from '../../layouts/Base.astro';

const releases = (await getCollection('releases')).sort(
  (a, b) => b.data.releaseDate.getTime() - a.data.releaseDate.getTime(),
);
---
<Base title="Music" description="Every album, EP and single, with streaming and purchase links.">
  <h1>Music</h1>
  <ul class="grid">
    {releases.map((release) => (
      <li>
        <a href={`/music/${release.id}/`}>
          <Image src={release.data.cover} alt={`${release.data.title} cover art`} width={400} height={400} />
          <h2>{release.data.title}</h2>
          <p>{release.data.type.toUpperCase()} · {release.data.releaseDate.getFullYear()}</p>
        </a>
      </li>
    ))}
  </ul>
</Base>

Each release then gets a detail page with getStaticPaths() and render(), showing the tracklist, credits from the Markdown body, purchase links and the player. Square cover art at fixed width and height means no layout shift as covers load.

Load streaming embeds on click

A single streaming iframe can pull in more JavaScript than the rest of your site combined, and a discography page with ten of them is slow on phones. Show the cover with a play button, and swap in the iframe only when someone clicks:

---
// src/components/LazyPlayer.astro
interface Props {
  src: string;
  title: string;
}
const { src, title } = Astro.props;
---
<lazy-player data-src={src} data-title={title}>
  <button type="button">Play {title}</button>
</lazy-player>

<script>
  class LazyPlayer extends HTMLElement {
    connectedCallback() {
      this.querySelector('button')?.addEventListener('click', () => {
        const iframe = document.createElement('iframe');
        iframe.src = this.dataset.src!;
        iframe.title = this.dataset.title!;
        iframe.loading = 'lazy';
        iframe.allow = 'autoplay; encrypted-media';
        iframe.width = '100%';
        iframe.height = '352';
        this.replaceChildren(iframe);
      }, { once: true });
    }
  }
  customElements.define('lazy-player', LazyPlayer);
</script>

This is a plain custom element, so it needs no framework and works with any provider’s embed URL. Astro bundles the script once even if the component appears many times. The web components in Astro guide explains the pattern further.

If you host your own audio previews, a native <audio controls preload="none"> element is even lighter and works everywhere.

Build the tour page

The tour page shows upcoming shows only. Filter at build time:

---
// src/pages/tour.astro
import { getCollection } from 'astro:content';
import Base from '../layouts/Base.astro';

const now = new Date();
const shows = (await getCollection('shows', ({ data }) => data.date >= now)).sort(
  (a, b) => a.data.date.getTime() - b.data.date.getTime(),
);
const fmt = new Intl.DateTimeFormat('en-GB', { day: 'numeric', month: 'short', year: 'numeric', timeZone: 'Europe/Berlin' });
---
<Base title="Tour dates" description="Upcoming shows and ticket links.">
  <h1>Tour dates</h1>
  {shows.length === 0 && <p>No shows announced. Join the mailing list to hear first.</p>}
  <ol>
    {shows.map((show) => (
      <li>
        <time datetime={show.data.date.toISOString()}>{fmt.format(show.data.date)}</time>
        <span>{show.data.venue}, {show.data.city}</span>
        {show.data.soldOut
          ? <span>Sold out</span>
          : show.data.tickets && <a href={show.data.tickets}>Tickets</a>}
      </li>
    ))}
  </ol>
</Base>

Because the filter runs at build time, a past show stays listed until the next build. Two fixes: schedule a daily rebuild with your host’s deploy hook (a cron job or GitHub Actions schedule works), or add a few lines of client script that hide rows whose datetime has passed. The daily rebuild is cleaner because the HTML stays correct for search engines too.

Pass timeZone to Intl.DateTimeFormat for each show’s local timezone if you tour across zones. Without it, dates are formatted in the build server’s timezone, which can move a late show to the wrong day.

Add MusicEvent structured data

Search engines can show upcoming shows from MusicEvent JSON-LD. Generate one object per show on the tour page:

---
// src/components/ShowsSchema.astro
import type { CollectionEntry } from 'astro:content';

interface Props {
  shows: CollectionEntry<'shows'>[];
}
const { shows } = Astro.props;

const schema = shows.map((show) => ({
  '@context': 'https://schema.org',
  '@type': 'MusicEvent',
  name: `The Night Shifts at ${show.data.venue}`,
  startDate: show.data.date.toISOString(),
  eventStatus: 'https://schema.org/EventScheduled',
  eventAttendanceMode: 'https://schema.org/OfflineEventAttendanceMode',
  location: {
    '@type': 'MusicVenue',
    name: show.data.venue,
    address: { '@type': 'PostalAddress', addressLocality: show.data.city, addressCountry: show.data.country },
  },
  performer: { '@type': 'MusicGroup', name: 'The Night Shifts' },
  ...(show.data.tickets && {
    offers: {
      '@type': 'Offer',
      url: show.data.tickets,
      availability: show.data.soldOut ? 'https://schema.org/SoldOut' : 'https://schema.org/InStock',
    },
  }),
}));
---
<script type="application/ld+json" set:html={JSON.stringify(schema)} />

On the home or about page, add a MusicGroup object with sameAs links to your streaming and social profiles so search engines connect them to your site. The Astro JSON-LD guide shows how to merge this with site-wide schema, and schema.org documents MusicEvent properties.

The press kit page

Promoters, bookers and journalists need the same files every time. One /press/ page answers them:

  1. Bio in three lengths: one line, one paragraph, and a full page.
  2. Press photos in high resolution, with photographer credit. Link the original files for download.
  3. Logos as SVG and PNG, light and dark.
  4. Facts: genre, home city, members, label, notable shows and releases.
  5. Contacts: booking, press, label, with real email addresses.
  6. Quotes from published reviews, each linked to the source.

For downloadable originals, put the files in public/press/ so Astro serves them unchanged. Use <Image /> from src/ for the on-page previews so visitors don’t load 20 MB photos just to see the page.

Mailing list and merch

A mailing list is the one channel you own. A short form posting to your email provider’s signup endpoint works on a static site; newsletter signup in Astro covers the options. Ask for an email and, optionally, a city, so you can email fans when you announce a show nearby.

For merch, most bands link to a store on Bandcamp or a print-on-demand service. If you want products on your own site, a buy button from your store provider embedded in a static page is enough.

Deploy

Build with npm run build and deploy dist/ to Cloudflare Pages, Netlify, Vercel or GitHub Pages. When you announce a tour, nothing needs scaling: static files on a CDN handle a traffic spike without any configuration. The static deploy docs list settings per host.

Start from a music theme

Free options: Astro’s official starters and general templates like AstroWind give you a layout, and you’d add the release and show collections above. If you’d rather start from a music design, the Komal catalog has a small set. Hollow Press is built for a small-run record label, with a catalogue, release detail pages carrying format and edition size, notes and a demo submission page; it’s currently the only theme in the Music & Audio category. For bands, the Arts & Entertainment category includes Belt, made for musicians, bands and tours with event pages, and Band, which has event and merch pages.

FAQ

Is Astro good for a band website?

Yes. A band site is mostly releases, dates, photos and links, which Astro serves as fast static pages. You can add interactive pieces like a player only where needed, and hosting is free on most static hosts.

How do I add Spotify or Bandcamp players without slowing my Astro site?

Don’t load the iframe on page load. Show the cover art and a play button, then insert the iframe when the visitor clicks. A small custom element does this with no framework.

How do I keep past tour dates off my band website?

Filter shows by date at build time and schedule a daily rebuild with your host’s deploy hook. That way past shows drop off automatically and the HTML stays accurate for search engines.

What should a band press kit page include?

A short and long bio, high-resolution press photos with credits, logos, key facts, booking and press contacts, and linked quotes from reviews. Put downloadable originals in public/ so they’re served unchanged.

Can a record label use the same setup as a band?

Yes. Add an artists collection, reference artists from each release, and generate a page per artist. The catalogue and release pages work the same way, and a demo submission page with clear rules replaces the band’s booking page.