Project Layouts & Monorepos
Choose where docu.json lives, run Flame in the correct workspace, and assemble a combined static artifact.
The directory containing docu.json determines where Flame reads docs/ and writes .docu/dist/. This filesystem root is independent of meta.basePath, which determines the docs URL prefix. Start with the shared configuration.
Application and docs in one project
Install Flame alongside the existing application dependencies. Add docs:dev and docs:build scripts as shown in the overview. Run both tools from this directory.
For Vite, a combined build can use:
The copy command preserves /docs inside dist/; copying .docu/dist/docs/ into dist/docs/docs/ would duplicate the prefix. The command uses POSIX cp. For a Windows build, perform the same copy with Node's fs.cpSync or your build tool.
Separate workspaces in a monorepo
The root package.json declares "workspaces": ["apps/*"]. Install Flame in the docs workspace:
Keep the dev and build scripts in apps/documentation/package.json local to that project:
Merge these fields with the package and dependency entries created by npm. From the repository root, run the workspaces explicitly:
Publish apps/web/dist/. For server-rendered applications, publish the two workspaces independently and use the hosting guide's external rewrite instead of copying into an adapter's output.
Flame searches for the nearest docu.json from its current working directory upward, checking at most six directories including the starting directory. It does not search child workspaces or combine multiple configs. If no config is found, it falls back to the working directory and config loading reports the missing file. A root-level config can therefore be selected when a child workspace has none.
Match the host's working directory
Use a workspace-aware install from the repository lockfile. A host's project root, install directory and publish directory are separate settings; account for each when writing copy commands. If the host limits access to files outside the selected project root, use a repository-root build or enable the platform's workspace support.
Each independently deployed docs project can reserve its own prefix, for example /docs and /handbook. Build them separately and route each complete prefix to its corresponding output. Give overlapping prefixes an explicit routing policy.
Verify that the selected workspace's .docu/dist/docs/guide.html exists, then follow the combined-site checks on a preview deployment.
Last updated Nov 7, 2026