docs

Static Sites

Build your site with any static generator, point YourSpace at the output directory, and deploy.

1. Build your site

Any static-site generator works. Build commands and output directories for popular generators:

FrameworkBuild commandOutput
Vite / Reactnpm run builddist
Next.js (static export)next build (with output: 'export')out
Hugohugo --minifypublic
Astroastro builddist
11ty (Eleventy)npx @11ty/eleventy_site
Jekyllbundle exec jekyll build_site

2. Name the output directory

Tell YourSpace which directory holds your built site. Set it once in yourspace.yml and every deploy picks it up:

# yourspace.yml
name: my-site

build:
  dist: dist    # or: build, public, _site, out — match your framework

yourspace init scaffolds this field for you — defaulting to dist and prompting during the interactive walk. Override per-run with yourspace deploy --dist <path>.

3. Deploy

$ yourspace deploy
  packed 14 file(s), 128 KB — uploading …
  ✓ deployed my-site (v1) at https://my-site.yo.urspace.net

See Deploy for flags and the full response shape.

Bundling manually

If you're uploading via the REST API or a CI pipeline that can't install the CLI, build a .tar.gz of the output directory and POST it to /v1/sites:

# For API/CI contexts where the CLI isn't available.
$ tar -czf site.tar.gz -C dist .
$ curl -X POST https://api.yo.urspace.net/v1/sites \
    -H "Authorization: Bearer $YOURSPACE_TOKEN" \
    -F "bundle=@site.tar.gz" \
    -F "config=@yourspace.yml"