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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-static-assets-routing-site-generation-ssg-and-custom-404-pages-workflow-guide.md | Documentation 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.text | A 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.text | A 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.text | An 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.text | A 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.text | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
