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
Prebuild Assemblies And Reference Them For Documentation Builds (#175)
* Use dll assemblies for documentation reference instead of having docfx attempt to build projects
* Added bash and powershell scripts to build perform documentation build
* Update workflows to use bash script for build
* Initialize submodules and build only if needed
* Add serve script
* Update readme
* Use projects for CI builds
Copy file name to clipboardExpand all lines: README.md
+41-5Lines changed: 41 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,51 @@ With your environment setup properly, the following explains how to build from s
22
22
dotnet tool restore
23
23
```
24
24
25
-
3. Optional Steps
25
+
3. Build and serve the documentation
26
26
27
-
If you want to generate the API Reference documentation locally, you will need to ensure that the MonoGame submodule has been initialized by running
27
+
The easiest way to build and serve the documentation locally is using the provided scripts:
28
28
29
-
`git submodule update --init --recursive`
29
+
**On Windows (PowerShell):**
30
30
31
-
4. Run a local build and serve it. The site is full DocFX now so a single build command will do:
31
+
```powershell
32
+
.\serve.ps1
33
+
```
32
34
33
-
`dotnet docfx docfx.json --serve`
35
+
**On macOS/Linux (Bash):**
36
+
37
+
```bash
38
+
./serve.sh
39
+
```
40
+
41
+
These scripts will automatically:
42
+
- Initialize MonoGame submodules if needed
43
+
- Build required assemblies for API documentation
44
+
- Generate the complete documentation
45
+
- Start a local web server
46
+
47
+
4. Alternative: Build-only (without serving)
48
+
49
+
If you only want to build the documentation without serving:
50
+
51
+
**On Windows (PowerShell):**
52
+
53
+
```powershell
54
+
.\build.ps1
55
+
```
56
+
57
+
**On macOS/Linux (Bash):**
58
+
59
+
```bash
60
+
./build.sh
61
+
```
62
+
63
+
**Or manually using DocFX:**
64
+
65
+
```sh
66
+
dotnet docfx docfx.json
67
+
68
+
> [!NOTE]
69
+
> The build scripts automatically handle submodule initialization and MonoGame assembly building. They only perform these steps when necessary, making subsequent builds faster.
34
70
35
71
> [!NOTE]
36
72
> Docfx hosting does not support hot reload, so to refresh the hosted site you will need to run `docfx docfx.json`in a separate terminal or stop and rerun the agent (ctrl-c)
0 commit comments