Documentation › Set up (developers)
Start a new site from the starter
galley new copies the Astro starter into a new folder, records a first version with git, installs its dependencies and opens it. What the starter contains, and what to change first.
This page is for a developer starting a site from nothing. galley new copies a starter — the small-business starter in starters/astro-starter unless you choose another with --starter (galley starters lists them: Caddow is astro-editorial, Ferrow is astro-saas) — and opens it in Galley, ready to edit.
Link to this section: Create it
$ galley new "Harbour Bakery" --dir ~/sites
Creating “Harbour Bakery” in /Users/you/sites/harbour-bakery from astro-starter…
✓ Copied the starter and recorded the first version
Installing dependencies with npm (this can take a minute)…
✓ Dependencies installed…and then it carries on exactly as galley ~/sites/harbour-bakery would: the server starts and the browser opens on the new site.
What happened, in order (source):
- The folder name is the name made safe for a package: lowercase, words joined by hyphens (
harbour-bakery). It must not exist yet. - The starter is copied without its
node_modules,.git,dist,.astroor.DS_Store, and the copy'spackage.jsongets the new name. - A first version is recorded:
git init, then one commit,Start Harbour Bakery from a starter, with theGalley-Publish: 1trailer, authored by your git identity (or a neutral one when git has none). Galley needs a commit to compare changes against. - Dependencies are installed with the package manager the starter's lockfile names (
npmwhen there is none). The starter needs Node 22.23.4 or newer, because Astro 7 does.
| Option | What it does |
|---|---|
--dir <folder> | Where to create the site's folder. Default: the current folder. |
--starter <id> | Which starter to copy. Default astro-starter; an unknown id lists the ones there are. |
--skip-install | Don't install dependencies (the preview installs them the first time it starts). |
--no-start | Stop after creating it, and print the command that opens it. |
-p, --port <port> | The port for the server when it starts. |
$ galley new "Harbour Bakery" --skip-install --no-start
Creating “Harbour Bakery” in /Users/you/harbour-bakery from astro-starter…
✓ Copied the starter and recorded the first version
Next: galley harbour-bakeryStarters are read from GALLEY_STARTERS_DIR, which defaults to the repository's starters/ folder. Any folder of starters works: one subfolder per starter, its name the id.
Link to this section: What the starter is
An ordinary Astro 7 site — no Galley dependency, no integration — written to be easy for people and for Galley to edit (its README):
- Pages (
src/content/pages/*.md) are a list of sections in front matter. There are sixteen section types —hero,logos,features,split,stats,steps,testimonial,testimonials,pricing,faq,gallery,team,posts,rich-text,cta,contact— declared as a zod discriminated union, so Galley offers each as a page section with its own fields. - A blog (
src/content/blog/) and a team (src/content/team/). - Data files:
src/data/site.json(name, contact details, social links, and every small piece of interface text underlabels) andsrc/data/navigation.json. Components contain no copy, so every word on the site is editable without touching code. - One theme file,
src/styles/tokens.css: colours, the two font families, type scale, spacing. CONTENT-GUIDE.md: the voice, every section type and its fields, image shapes.galley.config.jsonlists it underai.instructions, so the assistant reads it before every conversation.galley.config.json: the few things detection can't know — URL patterns, the media folder, the guide.
The sample content is a fictional architecture studio. galley new changes only the package name, so the copy still says Lowfield Studio everywhere — including "name" in galley.config.json, which is the name Galley shows for the site.
Link to this section: What to change first
"name"ingalley.config.json— the name on the Sites screen.urlinsrc/data/site.jsonandsiteinastro.config.ts— your real domain. Galley readssiteas the live address to compare previews with; while it ishttps://www.example.comit is treated as a placeholder and ignored (galley doctorsays so).- The Voice section of
CONTENT-GUIDE.md, so the assistant writes like the new organisation rather than the sample one. - The content itself — in the editor, or by asking the assistant.
Link to this section: Building a site from a brief
POST /api/sites/create also accepts a short brief — what the organisation does, the audience, the tone, the pages wanted, a brand colour — and then hands the assistant a first build-mode task: rewrite the identity, compose the pages from the existing section types, deal with the sample posts and people, re-theme through the tokens file, and run the build (the task it is given). It needs an Anthropic key. The New site screen that collects the brief in the web UI is still being built.
Link to this section: Next
- Connect the assistant — needed for chat and for building from a brief.
- Make an Astro site easy to edit — the conventions the starter follows, for sites you build yourself.
- Hand a site over to an editor.