Skip to content

Commit ad4b325

Browse files
Patch readme
1 parent 1994578 commit ad4b325

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

README.md

+31-10
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,47 @@ With your environment setup properly, the following explains how to build from s
1717
git clone https://github.com./MonoGame/monogame.github.io.git
1818
```
1919

20-
2. Install npm dependencies
20+
2. Install DotNet dependencies
2121

2222
```sh
23-
npm install
23+
dotnet tool restore
2424
```
2525

2626
3. Optional Steps
2727

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
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
2929

3030
`git submodule update --init --recursive`
3131

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

34-
| Command | Generates Website | Generates Articles | Generates API | Description |
35-
| --- | --- | --- | --- | --- |
36-
| `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:
54+
55+
[DocFX Markdown style guide](https://dotnet.github.io/docfx/docs/markdown.html?tabs=linux%2Cdotnet#alerts)
56+
57+
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
4061

4162
## LICENSE
4263

0 commit comments

Comments
 (0)