daypress
admin route/d-admin/publish
doc versionv1.0.4
reading time6 min read
section group28 · Hosting, Security & Ops
Docs/Hosting, Security & Ops
/d-admin/publish6 min readv1.0.4

Static Edge Publisher: Cloudflare Pages, Netlify & Local ZIP

Keep Daypress running privately on localhost or an internal studio VM for editing and AI agent workflows, then publish a pre-rendered static bundle to global edge CDNs with zero public origin server to patch.

What the static compiler generates

When you trigger a build in Publish → Static Edge (/d-admin/publish) or call daypress_publish_site, Daypress crawls every published route and writes a self-contained artifact tree:

static bundle layout
static-export/
├── index.html                    # Pre-rendered front page with DayStudio CSS & Schema.org JSON-LD
├── <slug>/index.html             # Every published post, page, CPT item & localized /{lang}/... route
├── category/<slug>/index.html    # Paginated category, tag, author & CPT archive directories
├── uploads/...                   # Referenced originals + AVIF/WebP derivatives
├── og-image/<id>.png             # Pre-baked 1200x630 Rust-rendered OpenGraph social cards
├── sitemap.xml & robots.txt      # Canonical edge URLs rewritten to your production domain
├── feed/index.xml                # RSS 2.0 & Atom syndication feeds
├── search-index.json             # Client-side instant search index for Cmd+K modal on static hosts
└── _redirects & 404.html         # Edge 301/302 rules compiled from daypress_redirects
/d-admin/publish · Static Edge Publisher & Deployment History
Daypress Static Edge Publisher showing target selection for Local ZIP, Cloudflare Pages, and Netlify alongside deployment history and rollback controls
Static Edge Publisher (/d-admin/publish): configure your public domain, choose Local/Cloudflare/Netlify, download .zip builds, or roll back to any prior deployment.

Deploy to Cloudflare Pages

  1. In Cloudflare Dashboard, copy your Account ID and create an API Token with Cloudflare Pages: Edit (and optional Zone DNS: Edit for 1-click custom domain CNAME binding).
  2. Open /d-admin/publish, select Cloudflare Pages, and enter your Public Site URL (e.g. https://mysite.com), Account ID, Project Name, and API Token (stored encrypted in SQLite).
  3. Click Publish to Edge. Daypress uploads changed asset hashes directly to Cloudflare's Direct Upload API and records the live deployment URL and manifest in your history table.

Deploy to Netlify or export a portable .zip

Select Netlify and provide a Personal Access Token + Site ID for SHA-1 delta uploads (only modified HTML/media digests are transmitted), or choose Local Directory / ZIP to write to data/static-export/ and download any historical build from GET /wp-json/daypress/v1/publish/deployments/{id}/download—ready for GitHub Pages, S3 + CloudFront, Nginx, or Surge.

json (MCP tools/call)
{
  "name": "daypress_publish_site",
  "arguments": {
    "target": "cloudflare",
    "public_url": "https://mysite.com",
    "cf_account_id": "023e105f4ecef8ad9ca31a8372d0c353",
    "cf_project_name": "mysite-prod"
  }
}

Dynamic features vs. static edge builds

Choosing Static Edge vs. Dynamic Rust Binary: Pure static edge deployments serve pages, CPT directories, client-side search, and _redirects globally with zero server upkeep. If your site requires server-side FormStudio vault submissions, member-gated newsletter unlocks, server-side A/B testing, or live REST/MCP writes on the public domain, run the Dynamic Rust Binary (a $4/mo VPS easily handles thousands of req/s in ~26 MB RAM).