Stedefast

stedefast export

2 min read

stedefast export

The export command adapts your built dist/ output for deployment targets beyond Cloudflare Pages. Run it after stedefast build.

stedefast export <adapter> [options]

Supported Adapters

Adapter Files Written Notes
netlify _redirects, netlify.toml Cache headers + SPA fallback
vercel vercel.json Clean URLs, cache headers; see note on Functions
github-pages .nojekyll Prevents Jekyll processing
nginx nginx.conf Config snippet for your server block
apache .htaccess Rewrite rules + cache headers

Options

Option Default Description
<adapter> netlify Deployment target
--config <path> ./stedefast.config.ts Path to Stedefast config
--out <dir> From config Override output directory

Examples

# Netlify
stedefast export netlify

# Vercel
stedefast export vercel

# GitHub Pages
stedefast export github-pages

# nginx
stedefast export nginx

# Apache
stedefast export apache

Adapter Details

Netlify

Creates two files:

_redirects

/*    /index.html   200

netlify.toml

[[headers]]
  for = "/assets/*"
  [headers.values]
    Cache-Control = "public, max-age=31536000, immutable"

[[headers]]
  for = "/*.html"
  [headers.values]
    Cache-Control = "public, max-age=0, must-revalidate"

Vercel

Creates vercel.json with cache headers and cleanUrls: true. Note: Cloudflare dynamic modules (comments, claps, etc.) use Cloudflare Pages Functions which are not compatible with Vercel Edge Functions. A VERCEL_FUNCTIONS_NOTE.md file is written explaining the migration path. Static-only sites deploy without any manual work.

GitHub Pages

Creates .nojekyll to prevent Jekyll from processing your build output. Dynamic modules are not supported on GitHub Pages — use a static-only build.

nginx

Writes nginx.conf as a snippet to paste inside your server {} block. Includes gzip, cache headers for fingerprinted assets, and clean-URL try_files fallback.

Apache

Writes .htaccess with mod_rewrite rules for clean URLs, cache headers, and gzip compression via mod_deflate.