Reference

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.

Keep Gate credentials out of the docs site.

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

SettingValue
Framework presetNone
Build commandnpm run build
Build output directory.
Root directoryRepository root
Environment variableDOCS_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.

Why inline scripts are allowed in CSP.

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

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.txt

Pre-deploy check

terminal
npm run build

The build regenerates Markdown, LLM, sitemap, and robots files, then validates security files, links, Markdown alternates, and secret hygiene.

Deploy

terminal
npm run build
npx wrangler pages deploy . --project-name stacksona-integrations-docs

Cloudflare 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.