Skip to content

Commit 3af795b

Browse files
committed
Update readme
1 parent 1550de9 commit 3af795b

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

README.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,51 @@ With your environment setup properly, the following explains how to build from s
2222
dotnet tool restore
2323
```
2424

25-
3. Optional Steps
25+
3. Build and serve the documentation
2626

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:
2828

29-
`git submodule update --init --recursive`
29+
**On Windows (PowerShell):**
3030

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+
```
3234

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.
3470
3571
> [!NOTE]
3672
> 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

Comments
 (0)