Docs/Developer/Build and deploymentPLOBS STUDIO

FACEIT BANNER / DOCS

Build and deployment

The production version is a set of static files served by nginx. There is no Node process in production.

Build

pnpm build
# = tsc && pnpm run docs && vite build
  • Vite builds two entries: the generator (index.html) and the widget (widget/index.html).
  • console and debugger calls are dropped from the production code.
  • VITE_FACEIT_API_KEY is baked in at build time, so it must be available in the build environment.

Documentation render (SSR)

The pnpm docs command builds src/docs/render.tsx in SSR mode (vite build --ssr) and runs the result in Node. The script renders the pages with React (renderToStaticMarkup) into public/docs and public/en/docs, generates public/sitemap.xml and public/llms.txt, and Vite copies them into dist. Content comes from src/docs/content.ts and src/docs/dev-content.ts, while the layout and parameter lists are computed from the app code. After changing the documentation bump DOCS_UPDATED in content.ts.

Docker and nginx

  • The Dockerfile has two stages: node:22-alpine builds the app and nginx:1.27-alpine serves the dist directory.
  • deploy/nginx.conf serves /docs/, /en/docs/ and /wiki/ as directories with index.html and routes the other paths to the app (SPA fallback).
  • The /widget/ path gets an X-Robots-Tag: noindex header.
  • captain-definition points CapRover at the Dockerfile; the API key is set in App Configs as VITE_FACEIT_API_KEY.

Open the generator

Updated: