Documentation menu

Documentation › Reference

Config reference

Every key galley.config.json accepts, with its type, its default and what it does. Checked against the engine's JSON Schema on every build of this site.

This page is for developers. It lists every key of galley.config.json. The file is validated by the zod schema in packages/core/src/content/config/schema.ts, which also produces the JSON Schema (configJsonSchema()); this site's build fails if a key here is missing from that schema or a schema key is missing here. Every key is optional unless marked required, and unknown keys are errors. Default means what Galley uses when the key is absent — usually what detection found.

How the file merges over detection: galley.config.json.

Link to this section: Top level

KeyTypeMeaning and default
$schemastringThe JSON Schema URL, for editors. galley init writes https://galley.fictiontribe.com/schema/galley.config.json (not served yet). Ignored by Galley.
namestringThe site's name in the Sites list and the assistant's description of the site. Default: package.json name (scope removed), unless it looks like a template's (my-…, astro-…, example…, starter…, site, website); else the folder name.
frameworkastro · eleventy · hugo · jekyll · next · nuxt · sveltekit · docusaurus · generic, or another adapter's id (^[a-z][a-z0-9-]*$)Which adapter describes the site. An id no loaded adapter has is reported and ignored. Default: the most confident adapter.
adaptersstring[] (non-empty strings)Adapters to load from this site before the built-in ones: package names in its node_modules, or paths to files inside it such as "./tools/my-adapter.mjs". See Adapters. Default: none.
pluginsstring[] (non-empty strings)Plugins to load for this site only: package names in its node_modules, or paths to files inside it such as "./tools/plugin.mjs". This runs the site's own code inside Galley, so only what is listed loads — and on a hosted Galley only when the operator sets GALLEY_ALLOW_SITE_PLUGINS=1. See Plugins. Default: none.
devobjectHow the preview starts the site. Default: detected.
dev.commandstringThe dev server command. Run as an argument array, not through a shell. Default: the dev, start or serve script, run with the site's package manager (npm run dev).
dev.portinteger > 0The port the dev server is expected on. A server already answering there is reused; otherwise the port the started server announces is used. Default: a --port in the script, else the framework's default (Astro: 4321).
buildobjectHow build mode checks the site. Default: detected.
build.commandstringThe build command run_build runs. Default: the build script, run with the package manager.
build.outDirstringWhere the build writes. Default: the framework's (Astro: dist).
urlsobjectThe deployed site. Default: detected.
urls.productionstring, a URLThe live site. Default: Astro site (placeholders ignored), a CNAME file, or package.json homepage.
urls.stagingstring, a URLA staging deployment; preferred over production for the side-by-side view.
mediaobjectMedia. Default: detected.
media.dirstringWhere new images are saved. Also added to writable.content. Default: the first of images, img, assets/images, assets/img, assets, media, uploads in the public folder; else <public>/images.
media.publicPathstringThe URL prefix media.dir is served from. Default: media.dir without its first segment (public/images → /images).
media.rootsobject[]Every folder the library lists. Replaces the detected list; media.dir is always included. Default: media.dir, and the public folder at /.
media.roots[].dirstring, required, non-emptyA folder, relative to the site root.
media.roots[].publicPathstring, required, non-emptyThe URL prefix it is served from.
publishobjectPublishing. Default: detected.
publish.branchstringCommit mode: the branch publishing is allowed from. Pull-request mode: the target branch. Default: the branch checked out.
publish.modecommit · pull-requestCommit and push, or a new galley/… branch and a pull request. Default: commit.
publish.remotestring or nullThe remote to push to. null: never push. Default: origin, else the first remote, else null.
publish.pushbooleanPush after committing. Default: true when there is a remote.
aiobjectAssistant instructions and build mode. Default: detected.
ai.instructionsstring[]Files whose text is added to the assistant's instructions. Replaces the default. Default: whichever of STYLE.md, STYLEGUIDE.md, STYLE_GUIDE.md, style-guide.md, docs/style-guide.md, brand/voice.md, VOICE.md, BRAND.md exist.
ai.allowBuildbooleanWhether the assistant's build mode is offered on this site. Default: true.
writableobjectThe write surface, as globs relative to the site root. Default: detected.
writable.contentstring[]What content mode may write. Replaces the default entirely. Default: each collection's folder (…/**) or data file, <media.dir>/**, and media files in the other detected roots.
writable.buildstring[]What build mode may write in addition. The deny-list always applies. Default: ["**/*"].
collectionsobject[]Collection overrides and additions, merged by id.
templatesobject[]Ready-made entries a new one can start from — a landing page, a pricing page (below). Default: none.
deployobjectWhere the site is put online (below). Written by the Online setup and galley deploy. Ids only: the host's access key is never in this file. Default: none.
redirectsobjectWhere the redirects list lives and which host applies it (below). Default: detected.
siteBrandobjectWhere the site's own brand is kept (below). Default: detected.

Link to this section: collections[]

KeyTypeMeaning and default
collections[].idstring, required, non-emptyMatches a detected collection to adjust it, or adds a new one.
collections[].labelstringThe plural name. Default: from the id (blog → Blog posts, events → Events).
collections[].singularstringThe singular name, as in New blog post. Default: from the id (blog → blog post, events → event).
collections[].descriptionstringShown with the collection; given to the assistant.
collections[].kindentries · dataOne file per item, or one file for the whole collection. Default: detected; for a new collection, data when path is a data file.
collections[].pathstringFolder (entries) or file (data), relative to the site root. Default: detected; required for a new collection.
collections[].patternstringEntries: a glob inside path. Default: detected (Astro: the loader's pattern).
collections[].formatmarkdown · mdx · json · yaml · tomlThe file format. TOML is read-only. Default: from the pattern or the file extension; else markdown.
collections[].bodybooleanWhether entries have a body below the front matter. Default: true for markdown and MDX.
collections[].urlstring or nullThe public URL pattern, with {slug}: "/blog/{slug}/". Default: from the framework's routes; null for data and for collections no route renders.
collections[].titleFieldstringThe field the list view shows as the title. Default: title, name, heading, headline or label, when present.
collections[].dateFieldstringThe field used for sorting by date. Default: date, pubDate, publishDate, publishedAt, … when present.
collections[].imageFieldstringThe field shown as the thumbnail. Default: image, heroImage, cover, thumbnail, featuredImage, ogImage, … when present.
collections[].draftFieldstringThe field that marks an entry as a draft. Default: draft, unpublished, hidden or private, when present.
collections[].createbooleanWhether new entries may be created from the app. Default: true for entries, false for data.
collections[].hiddenbooleanLeave the collection out of the navigation. Default: false.
collections[].fieldsobject[]Field overrides and additions, merged by key.

Link to this section: Fields

The same object is used for collections[].fields[], for a list's item (of), for an object's nested fields, and for a block type's fields.

KeyTypeMeaning and default
collections[].fields[].keystring, required, non-emptyThe field's key in the file.
collections[].fields[].labelstringThe label in the form. Default: the key in words (heroImage → Hero image).
collections[].fields[].typestring · text · markdown · number · boolean · date · datetime · image · url · color · select · tags · list · object · blocks · reference · jsonField types. Default: detected; string for a field only the config names.
collections[].fields[].requiredbooleanWhether a missing value is reported. Default: detected (schema, or present in 95 % of files).
collections[].fields[].descriptionstringHelp text under the field; given to the assistant. Default: the schema's .describe().
collections[].fields[].optionsstring[]select: the allowed values. tags: suggestions. Default: from the schema's enum, or strong evidence.
collections[].fields[].discriminatorstringblocks: the key naming each section's type. Default: detected (type, _component, _type, …).
collections[].fields[].collectionstringreference: the collection id it points into. Default: from reference("…").
collections[].fields[].defaultany JSON valueThe value a new entry starts with. Default: the schema's .default().
collections[].fields[].examplesJSON value[]Placeholders in the form; context for the assistant. Default: up to three real values.
collections[].fields[].hiddenbooleanHide the field from the form; its value is kept. Default: false.
collections[].fields[].dataSourcestring, a data source id (^[a-z][a-z0-9-]*$)Pick the value from a plugin's data source — a product or a collection from the Shopify plugin (shopify-products). The file keeps a plain string. Default: none.
collections[].fields[].offield object (key defaults to item)list: the shape of one item. Default: detected.
collections[].fields[].fieldsfield object[]object: the nested fields. Default: detected.
collections[].fields[].blocksblock object[]blocks: the section types, merged by type. Default: detected.

Link to this section: Block types

KeyTypeMeaning and default
collections[].fields[].blocks[].typestring, required, non-emptyThe discriminator value: hero, cta.
collections[].fields[].blocks[].labelstringThe section's name in the form. Default: from the type (rich-text → Rich text).
collections[].fields[].blocks[].descriptionstringShown when choosing a section; given to the assistant.
collections[].fields[].blocks[].countnumberInformational; detection fills it in. Default: how many the files contain.
collections[].fields[].blocks[].exampleobjectWhat Add section inserts. Default: the most complete real instance.
collections[].fields[].blocks[].thumbnailstring, non-emptyA picture of this section, relative to the site's folder (galley/sections/hero.webp), shown when choosing a section in the form and in Arrange. Default: none — the section is shown by name.
collections[].fields[].blocks[].fieldsfield object[]The section's fields. Default: detected.

Link to this section: Templates

A template is an ordinary entry file the site keeps for starting new ones: a new entry made from it starts as a copy of the file, in its own key order and style. Today a template is used through the API (template in POST /api/sites/:siteId/entries); the app's New page window doesn't offer templates yet.

KeyTypeMeaning and default
templates[].idstring, letters, digits and dashes, required, uniquelanding-page.
templates[].labelstring, required, non-emptyIts name when choosing: Landing page.
templates[].descriptionstringOne line on what it is for.
templates[].collectionstring, required, non-emptyThe collection a new entry made from it goes in.
templates[].filestring, required, non-emptyThe template file, relative to the site's folder, in the same format as that collection's entries (galley/templates/landing.md).
templates[].thumbnailstring, non-emptyA picture of the finished page, relative to the site's folder.

Link to this section: Deploy

Written by the Online setup and by galley deploy (Deploying, for developers). All ids — access keys are kept in Galley's own secrets.

KeyTypeMeaning and default
deploy.targetstring, required, a host id (cloudflare, vercel, or a plugin's)The host.
deploy.accountstring, required, 1–100 charactersThe Cloudflare account id or the Vercel team id.
deploy.projectstring, required, lowercase letters, digits and dashes, up to 54The project (Cloudflare Worker, Vercel project) the site goes into.
deploy.productionUrlstring, a URLThe live address, written after the first deploy.
deploy.autoDeploybooleanPut changes live every time I publish: each publish puts the new version online by itself. Default: false.
deploy.previewOnSharebooleanfalse hides Share a preview link in Proof. Default: shown.

Link to this section: Redirects

KeyTypeMeaning and default
redirects.filestring, a .json file inside the siteThe redirects list. Default: beside the site's other JSON data files, else src/data/redirects.json.
redirects.hostcloudflare · netlify · vercel · otherWhich host's file is written from the list. deploy.target wins when set. Default: asked once on the Redirects screen.
redirects.cloudflareobjectFor setting the list on Cloudflare itself (Bulk Redirects). Ids only.
redirects.cloudflare.accountstring, 1–100 charactersThe Cloudflare account, when deploy doesn't give one.
redirects.cloudflare.hostnamesstring[], domain names, at most 20The site's own domains on Cloudflare: ["example.com", "www.example.com"].

Link to this section: Site brand

KeyTypeMeaning and default
siteBrand.dirstring, a folder inside the siteWhere the brand's files are written. Default: galley/brand.
siteBrand.largeFileMBnumber, 0–1000Material larger than this stays in Galley's own folder for the site, not in the site. Default: 10.
siteBrand.tokensFilestring, a .css, .scss, .less or .pcss file inside the siteThe stylesheet that holds the design values, which Apply to the site writes into. Default: the stylesheet that declares most of them (the starters: src/styles/tokens.css).

Link to this section: A complete example

json
{
  "$schema": "https://galley.fictiontribe.com/schema/galley.config.json",
  "name": "Harbour Bakery",
  "framework": "astro",
  "dev": { "command": "pnpm dev", "port": 4321 },
  "build": { "command": "pnpm build", "outDir": "dist" },
  "urls": { "production": "https://www.harbourbakery.example", "staging": "https://staging.harbourbakery.example" },
  "media": { "dir": "public/images", "publicPath": "/images", "roots": [{ "dir": "public", "publicPath": "/" }] },
  "publish": { "branch": "main", "mode": "pull-request", "remote": "origin", "push": true },
  "ai": { "instructions": ["CONTENT-GUIDE.md"], "allowBuild": false },
  "writable": { "content": ["src/content/**", "src/data/*.json", "public/images/**"] },
  "redirects": { "file": "src/data/redirects.json", "host": "cloudflare" },
  "siteBrand": { "dir": "galley/brand", "tokensFile": "src/styles/tokens.css" },
  "templates": [
    { "id": "landing", "label": "Landing page", "collection": "pages", "file": "galley/templates/landing.md" }
  ],
  "collections": [
    { "id": "blog", "label": "Journal", "singular": "post", "url": "/journal/{slug}/", "dateField": "date" },
    { "id": "menu", "kind": "data", "path": "src/data/menu.yaml", "format": "yaml", "label": "Menu" },
    {
      "id": "pages",
      "fields": [
        { "key": "category", "type": "select", "options": ["Shop", "Story", "Visit"] },
        {
          "key": "sections",
          "type": "blocks",
          "discriminator": "type",
          "blocks": [{ "type": "hero", "label": "Opening", "fields": [{ "key": "heading", "type": "string", "required": true }] }]
        }
      ]
    }
  ]
}