Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Static Site Generation (SSG) and custom 404 pages

Configures Cloudflare Workers to host Static Site Generation (SSG) applications by setting up directory assets, managing trailing slash behavior via htmlhandling, and implementing custom 404 error pages.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Static Site Generation (SSG) and custom 404 pages

Configures Cloudflare Workers to host Static Site Generation (SSG) applications by setting up directory assets, managing trailing slash behavior via htmlhandling, and implementing custom 404 error pages.

When To Use

Use when you need to deploy a pre-rendered framework like Gatsby or Docusaurus to Workers and want to configure custom 404 error handling or trailing slash URL patterns.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-static-assets-routing-site-generation-ssg-and-custom-404-pages-workflow-guide.mdDocumentation explaining how to implement static site generation and configure custom 404 error pages using Cloudflare Workers static assets.Questions about documentation explaining how to implement static site generation and configure custom 404 error pages using Cloudflar...
examples/workers-static-assets-routing-site-generation-ssg-and-custom-404-pages-c.textA wrangler.toml configuration snippet demonstrating static site generation settings and custom 404 page handling for Cloudflare Workers.Exact payloads, commands, or snippets shown in A wrangler.toml configuration snippet demonstrating static site generation settings and custom 404 page handling for...
examples/workers-static-assets-routing-site-generation-ssg-and-custom-404-pages-c-2.textA wrangler.toml configuration file demonstrating static asset routing, directory specification, and custom 404 page handling for Workers SSG.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating static asset routing, directory specification, and custom 404 page h...
examples/workers-static-assets-routing-site-generation-ssg-and-custom-404-pages-c-3.textAn HTML document demonstrating the structure for a static site generation implementation with custom 404 error handling logic.Exact payloads, commands, or snippets shown in An HTML document demonstrating the structure for a static site generation implementation with custom 404 error handli...
examples/workers-static-assets-routing-site-generation-ssg-and-custom-404-pages-c-4.textA JavaScript example using WorkerEntrypoint to implement static site generation and custom 404 error handling logic.Exact payloads, commands, or snippets shown in A JavaScript example using WorkerEntrypoint to implement static site generation and custom 404 error handling logic.
examples/workers-static-assets-routing-site-generation-ssg-and-custom-404-pages-c-5.textA TypeScript example using WorkerEntrypoint to implement static site generation and custom 404 routing logic.Exact payloads, commands, or snippets shown in A TypeScript example using WorkerEntrypoint to implement static site generation and custom 404 routing logic.

What This Skill Covers

  • Static Site Generation (SSG) and custom 404 pages
  • Main sections: Configuration, Custom 404 pages, Navigation requests, Client-side callbacks, Local Development.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/static-assets/routing/static-site-generation