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
If you want to generate the API Reference documentation locally, you will need to ensure that the MonoGame submodule has been initialized by running
28
+
If you want to generate the API Reference documentation locally, you will need to ensure that the MonoGame submodule has been initialized by running
29
29
30
30
`git submodule update --init --recursive`
31
31
32
-
4. Run a local build and serve it with hot reloading. Depending on what part of the site you are working on, there are different commands you can use. They are explained in the table below
32
+
4. Run a local build and serve it. The site is full DocFX now so a single build command will do:
|`npm run dev`| ✔ | ✔ | ✔ | This will run and serve the full website, including the web pages generated by 11ty and the articles and api documentation built by docfx. This can be slower to use when developing since all API documentation (~500 files) will be built initially and again during each hot reload change. If you're not working specifically on the API documentation page, it is suggested to use one of the other commands instead. |
37
-
| `npm run website` | ✔ | ❌ | ❌ | This will run and serve the website with only the web pages generated by 11ty. The articles and api documentation generated by docfx will be bypassed. This is useful when you're only working on the main website pages and want fast hot reloading.|
38
-
|`npm run articles`| ✔ | ✔ | ❌ | This will run and serve the website including the webpages generated by 11ty and the articles generated by docfx only. It will not generate the API documentation. This is to allow fast hot reloading while working on the articles by not having all API documentation files (~500 files) be included. |
39
-
|`npm run build`| ✔ | ✔ | ✔ | This will perform a full build of the website, including the web pages built in 11ty and the articles and api documentation built by docfx. |
34
+
`dotnet docfx docfx.json --serve`
35
+
36
+
> [!NOTE]
37
+
> Docfx hosting does not support hot reload, so to refresh the hosted site you will need to stop the agent (ctrl-c) and run the above command again to refresh pages
38
+
39
+
## Document styling
40
+
41
+
The use of DocFX with the updated MonoGame docs site has afforded the use of some custom stylings to improve consistency and more stylized docs:
42
+
43
+
- Document Frontmatter now drives the Title, Description and whether or not a MS license statement is needed in the document.
44
+
45
+
```text
46
+
---
47
+
title: How to create a Render Target
48
+
description: Demonstrates how to create a render target using a RenderTarget2D.
49
+
requireMSLicense: true
50
+
---
51
+
```
52
+
53
+
- DocFX admonitions are supported for adding Notes, Info Panels etc, for more details see the MS docs on DocFX markdown:
As an example of a document written using the above notes, please refer to the [HowTo: Create a Render Target tutorial](https://github.com./MonoGame/docs.monogame.github.io/blob/feature/docsmigration/articles/monogame/howto/graphics/HowTo_Create_a_RenderTarget.md)
58
+
59
+
> [!TIP]
60
+
> No additional text is needed at the bottom of document pages as the licenses and requirements are automatically added by the DocFX build system
0 commit comments