Cloudflare deployment
Deploy the Stacksona docs site as a static, secure, efficient Cloudflare Pages project with no backend, no customer data, and no committed agent keys.
Deployment model
This site should be deployed as static files on Cloudflare Pages. It serves public documentation, search metadata, SEO files, and plain Markdown routes. It does not need a Worker Function, database, KV namespace, API proxy, cookie, or customer secret.
Users provide their own STACKSONA_GATE_URL, usually shaped like https://{gate-id}.stacksona.cloud, and their own sg_ agent key inside their private runtime, n8n credentials, CI secret store, or server-side environment.
Cloudflare Pages settings
| Setting | Value |
|---|---|
| Framework preset | None |
| Build command | npm run build |
| Build output directory | . |
| Root directory | Repository root |
| Environment variable | DOCS_BASE_URL=https://docs.stacksona.com |
Security headers
The repo includes a Cloudflare Pages _headers file. It applies HSTS, content-type sniffing protection, frame blocking, referrer limits, restrictive browser permissions, cross-origin isolation headers, a static-site CSP, and cache behavior for HTML, assets, Markdown, and discovery files.
The pages include inline JSON-LD structured data for SEO. The site is static and does not accept user-generated content.
Efficient static serving
HTML pages are revalidated. Static assets use short browser caching with stale-while-revalidate. Markdown and LLM files are served inline with public CORS because they contain public docs only.
Canonical and Markdown routes
https://docs.stacksona.com/integrations/n8n
https://docs.stacksona.com/integrations/n8n.md
https://docs.stacksona.com/reference/api-contract
https://docs.stacksona.com/reference/api-contract.md
https://docs.stacksona.com/llms.txt
https://docs.stacksona.com/llms-full.txtPre-deploy check
npm run buildThe build regenerates Markdown, LLM, sitemap, and robots files, then validates security files, links, Markdown alternates, and secret hygiene.
Deploy
npm run build
npx wrangler pages deploy . --project-name stacksona-integrations-docsCloudflare deployment FAQ
Does this site need Cloudflare Workers?
No. The docs site is static and uses Cloudflare Pages headers and redirects only.
Does the docs repo contain agent keys?
No. Agent keys belong in customer runtimes and private platform secret stores, not public docs.
Can agents fetch Markdown?
Yes. Add .md to public docs routes to get plain Markdown.