You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
summary: "Add the docs-template into an existing monorepo and run it locally (pnpm workspace, workflows, and content setup)."
4
+
description: "Step-by-step guide for integrating the docs-template into a monorepo: add the `docs/` package to `pnpm-workspace.yaml`, move CI workflows to `.github/workflows`, resolve FIXME markers, replace example content under `docs/content`, and run the local dev server with pnpm."
5
+
---
6
+
7
+
## Usage inside a monorepo
8
+
9
+
This page explains the minimal steps to install the docs-template into an existing monorepo and run the documentation locally. The template is designed to be dropped under the `/docs` folder of your repository and wired into pnpm workspaces.
10
+
11
+
Follow these steps:
12
+
13
+
1. Create a repository (or use an existing one)
14
+
15
+
- You can start from our example stack `@forge42/open-source-stack` or any repo you control. The important part is that you can add a `/docs` folder and control the repository root (where `.github`, `pnpm-workspace.yaml`, etc. live).
16
+
17
+
2. Download and extract the docs-template into your monorepo
18
+
19
+
- Download the `docs-template` files from the main branch (or copy the template contents) and extract them into the repository root inside a `docs/` directory.
20
+
21
+
- Make sure your root `pnpm-workspace.yaml` includes the `docs` package so pnpm can hoist and link the docs project. Example snippet:
22
+
23
+
```yaml
24
+
packages:
25
+
packages/*
26
+
test-apps/*
27
+
+ docs
28
+
onlyBuiltDependencies:
29
+
'@biomejs/biome'
30
+
esbuild
31
+
lefthook
32
+
```
33
+
34
+
35
+
3. Move or add workflow files to `.github/workflows` in the monorepo root
36
+
37
+
- The template includes CI workflows (for example: `ci.yml`, `publish-documentation.yml`, and `pr-close.yml`). Move these into your repository root under `.github/workflows/` so GitHub Actions can find and run them.
38
+
39
+
- The workflows use Fly.io and the template `fly.toml` and `Dockerfile`. If you don't use Fly, you can customize the workflows or remove those steps.
40
+
41
+
4. Check and resolve FIXME comments inside workflows
42
+
43
+
- Open the workflow files and search for `FIXME` markers. Resolve those before relying on the workflows.
44
+
45
+
5. Make sure you have a `/content` folder with documentation pages
46
+
47
+
- The template ships with example content in `docs/content` that briefly explains how the template works. Remove those example files and add your own documentation content (for example: `01-getting-started.mdx`, `02-project-structure.mdx`, etc.).
48
+
49
+
6. Install and run locally
50
+
51
+
- From the repository root run:
52
+
53
+
```bash
54
+
pnpm install
55
+
pnpm run dev
56
+
```
57
+
58
+
- After `pnpm run dev` the docs server will start (see terminal output for the local dev URL). Open the URL in your browser to preview the site.
59
+
60
+
Notes and tips
61
+
62
+
- If your monorepo already has a `docs/` package, merge carefully to avoid overwriting important files.
63
+
- Keep `fly.toml` and `Dockerfile` at the root of the `docs` package (or where the workflows expect them). If you move them, update the workflow paths accordingly.
64
+
- Verify `pnpm-workspace.yaml` indentation and syntax — YAML parsing errors can stop workspace linking.
65
+
- If you use a different package manager or CI provider, adapt the commands and workflow steps.
0 commit comments