Skip to content

Commit c62eaf9

Browse files
Merge branch 'main' into dellis1972-package-android
2 parents 7fb0c05 + d256864 commit c62eaf9

10 files changed

+67
-76
lines changed

Diff for: CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Breaking these rules can result in your contribution being rejected.
1717

1818
For further details for guidance and advice when contributing to the MonoGame Framework Documentation / API repository, please see the official guide:
1919

20-
### [MonoGame Documentation official contributing guide](https://docs.monogame.net/articles/contributing)
20+
### [MonoGame Documentation official contributing guide](./articles/contributing.md)
2121

2222
## License
2323

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This repository contains the documentation for MonoGame.
44

5-
## Building Form Source
5+
## Building From Source
66

77
The MonoGame website is built using the .NET tool [DocFX](https://dotnet.github.io/docfx/) to generate the base MonoGame documentation and the API reference documentation. This means you will need the following prerequisites to build locally from source
88

@@ -33,7 +33,7 @@ With your environment setup properly, the following explains how to build from s
3333
`dotnet docfx docfx.json --serve`
3434

3535
> [!NOTE]
36-
> 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
36+
> 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)
3737

3838
## Document styling
3939

@@ -53,7 +53,7 @@ The use of DocFX with the updated MonoGame docs site has afforded the use of som
5353

5454
[DocFX Markdown style guide](https://dotnet.github.io/docfx/docs/markdown.html?tabs=linux%2Cdotnet#alerts)
5555

56-
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)
56+
As an example of a document written using the above notes, please refer to the [HowTo: Create a Render Target tutorial](./articles/getting_to_know/howto/graphics/HowTo_Create_a_RenderTarget.md)
5757

5858
> [!TIP]
5959
> No additional text is needed at the bottom of document pages as the licenses and requirements are automatically added by the DocFX build system

Diff for: articles/console_access.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ We will process these requests to give you access and further instructions.
4545

4646
To publish on Xbox, you must first be a member of the [ID@Xbox Program](https://developer.microsoft.com/en-US/games/publish/).
4747

48-
Once you are active in the program you can email `[email protected]` and copy the MonoGame`[email protected]`account requesting Xbox Developer verification for access to MonoGame for Xbox.
48+
Once you are active in the program you can email `[email protected]` and copy the MonoGame `[email protected]` account requesting Xbox Developer verification for access to MonoGame for Xbox.
4949

5050
Once Microsoft approves your development status we will respond with further instructions.
5151

Diff for: articles/contributing.md

+55-65
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,116 @@
11
---
2-
title: Contributing guidelines
3-
description: The following rules must be observed at all times when contributing documentation to the MonoGame project.
2+
title: Contributing Guidelines
3+
description: Instructions on how to contribute to the documentation of the MonoGame Framework
44
---
55

6-
# General Rules
7-
8-
The following rules must be observed at all times when contributing documentation to the MonoGame project.
9-
10-
- Write in a neutral, technical tone.
11-
- Avoid humor, personal opinions, and colloquial language.
12-
- **Never** plagiarize any documentation from another source.
13-
- Do not use automatic documentation tools as they are ineffective.
14-
15-
Breaking these rules can result in your contribution being rejected.
16-
17-
## Getting Started
18-
19-
You can create and edit documentation right from the web browser without needing to install Git or ever leave the GitHub site.
20-
21-
- [Fork the MonoGame repo](https://help.github.com/articles/fork-a-repo/).
22-
- [Create a new branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) from `develop` and make your changes only in that branch.
23-
- [Create a new file](https://help.github.com/articles/creating-new-files/) or [edit an existing one](https://help.github.com/articles/editing-files-in-your-repository/) using the GitHub markup editor.
24-
- [Submit pull requests](https://help.github.com/articles/creating-a-pull-request/) early and often to merge your documentation changes.
6+
# Contributing to MonoGame Documentation
257

26-
## Generate the output before submission
8+
Thank you for choosing to contribute to the MonoGame project! This page provides guidance on how you can help to improve the documentation for MonoGame.
279

28-
The `MonoGame.GitHub.io` site has the ability to generate the documentation website locally so that you can verify how the documentation renders `BEFORE` submission, we recommend all contributors validate what is written as it is rendered on the website to help the reviewers checking the PR request.
10+
# Getting Started
2911

30-
> [!TIP]
31-
> If possible, include a screenshot in your PR showing the rendered output. Recommended, but not mandatory.
32-
33-
See the following sections for more details on generating the relevant website pages:
12+
> [!NOTE]
13+
> If you are new to making contributions to open source projects, it is recommended to understand the following concepts before submitting your contribution:
14+
>
15+
> - [How to fork a repo](https://help.github.com/articles/fork-a-repo/).
16+
> - [Creating a new branch for your fork](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) from `main`.
17+
> - [Creating a new file](https://help.github.com/articles/creating-new-files/) or [editing an existing one](https://help.github.com/articles/editing-files-in-your-repository/) using the GitHub markup editor.
18+
> - [How to submit your contributions for review through a pull request](https://help.github.com/articles/creating-a-pull-request/).
3419
35-
- [Generating the Documentation website](#generating-the-documentation-website)
36-
- [Generating the API Documentation](#generating-the-api-documentation)
20+
## Articles and API References
3721

38-
## Style Guide
22+
The MonoGame documentation contains two types of documents: articles and API references.
3923

40-
Review the following expectations before contributing any documentation.
24+
Articles include manuals, guides and tutorials on how to use the MonoGame Framework to create games.
4125

42-
### Manuals, Guides, and Tutorials
26+
API references provide detailed explanation of each class and method found in the MonoGame Framework. The documentation is written in the [C# XML format](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments) and is inline to the MonoGame source code.
4327

44-
TODO!
28+
## Generating the Documentation Site
4529

46-
#### Generating the Documentation website
30+
The pages for articles and API references are hosted on a documentation site that is generated using [DocFX](https://dotnet.github.io/docfx/).
4731

48-
To generate the documentation site locally, simply:
32+
To generate a local copy of the documentation site:
4933

50-
1. Clone the [MonoGame.GitHub.io](https://github.com/MonoGame/MonoGame.github.io) repository.
51-
2. Follow the instructions in the site readme for preparing your environment and generating the documentation.
52-
3. Use the `npm run articles` command to finally generate the site to only check the documentation updates (although it may be easier to simply run `npm run dev` to generate everything)
53-
4. Browse the running site from `http://localhost:xxxx`
34+
1. Fork the [docs.monogame.github.io](https://github.com/MonoGame/docs.monogame.github.io) repository.
35+
2. Follow the instructions in the site's [readme](https://github.com/MonoGame/docs.monogame.github.io?tab=readme-ov-file#docsmonogamegithubio) for preparing your environment and generating the documentation.
36+
3. If you intend to make contributions to the API References, then run `git submodule update --init --recursive` command to update the `external/MonoGame` submodule to your local fork.
37+
4. Use the `dotnet docfx docfx.json --serve` command to serve a local copy of the documentation site.
38+
5. Browse the running site from `http://localhost:xxxx`.
5439

55-
Check the `Documentation Hub` pages for your changes and include screenshots of the pages when you are ready to submit. (Optional, but recommended)
40+
> [!TIP]
41+
> Verify your changes in your local documentation site before submitting a pull request with said changes. It is recommended to include screenshots of the pages in the pull request to help reviewers confirm these changes.
5642
57-
### API Reference
43+
# General Rules
5844

59-
The API reference documentation is a big part of the documentation effort for MonoGame. The documentation is written in the [C# XML format](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments) and is inline to the MonoGame source code. The final web pages with API documentation are generated using [DocFX]([DocFX - static documentation generator | DocFX website](https://dotnet.github.io/docfx/)).
45+
The following rules **must** be observed at all times when contributing documentation to the MonoGame project.
6046

61-
#### Generating the API documentation
47+
- Write in a neutral, technical tone.
48+
- Avoid humor, personal opinions, and colloquial language.
49+
- **Never** plagiarize any documentation from another source.
50+
- Do not use automatic documentation tools as they are ineffective.
6251

63-
To generate the docs locally, simply:
52+
> [!WARNING]
53+
> Breaking these rules can result in your contribution being rejected.
6454
65-
1. Clone the [MonoGame.GitHub.io](https://github.com/MonoGame/MonoGame.github.io) repository.
66-
2. In the `External` folder, update the `MonoGame` submodule to your own **Fork/Branch**.
67-
3. Follow the instructions in the site readme for preparing your environment and generating the documentation.
68-
4. Use the `npm run dev` command to finally generate the site to view both API and general documentation pages.
69-
5. Browse the running site from `http://localhost:xxxx`
55+
# General Style Guide
7056

71-
Check the `API Reference` pages for your changes and include screenshots of the pages when you are ready to submit. (Optional, but recommended)
57+
Because there are many contributors to the MonoGame documentation, it can be difficult to maintain a coherent writing style throughout the documentation site. In addition to the [General Rules](#general-rules), this style guide serves to inform contributors of the conventions needed to maintain this writing style. So please review the following expectations before contributing any documentation.
7258

73-
#### Every Word Should Contain Value
59+
## Every Word Should Contain Value
7460

7561
Every word in the reference documentation should provide information beyond the API itself. Documentation that only rehashes or rephrases what is already apparent in the class, method, parameter, or property name has zero value and wastes time for both the writer and reader.
7662

77-
#### The First Sentence Is the Most Important
63+
## The First Sentence Is the Most Important
7864

7965
There is no guarantee that the reader will read beyond the first sentence of the reference documentation. This is why that first sentence is the most important and should convey the most key piece of information. Take your time to write the most concise and clear first sentence possible. This helps users tremendously and goes a long way towards having great documentation.
8066

81-
#### Surface Information Hidden in the Code
67+
## Surface Information Hidden in the Code
8268

8369
Being inline with the code allows you to easily look for critical information within it that the user might not know from looking at the API alone. Take your time to explore inner method calls and platform specific sections of the code. The time to write the documentation is once you feel you fully understand the code you are documenting. If you don't feel you understand the code then leave the documentation for someone else to write.
8470

85-
#### Focus on what adds value to the consumer
71+
## Focus on What Adds Value to the Consumer
8672

8773
Limit documentation to public methods and functions unless there is a specific reason to include internal methods, while documenting internals helps with readability of the code, it provides limited use to consumers of the MonoGame Framework.
8874

89-
#### Documentation Is Referenced Not Read
75+
## Documentation Is Referenced Not Read
9076

9177
Remember that the user is searching for an answer for a specific question. It is your job to predict these questions and provide them clear answers.
9278

93-
#### Descriptions should add value and understanding
79+
## Descriptions Should Add Value and Understanding
9480

9581
Describing a thing by naming the thing does not help the developer to understand what the concept is that you are describing, for example:
9682

9783
> "The Genre class provides information about a genre"
9884
9985
Which does not help someone reading the documentation if they do not know what a `Genre` is. Be descriptive and improve the readers understanding for what something is and WHY it is.
10086

101-
#### XML Tag guidance
87+
# API Reference Style Guide
88+
89+
In addition to the [General Style Guide](#general-style-guide), please consider the following conventions used for code associated with the API reference docs.
90+
91+
## XML Tag Guidance
10292

10393
By default, the standard [Microsoft recommendations](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags) should be used for filling in XML tags for each class, method and property.
10494

10595
With a few points to call out:
10696

107-
#### See / CRef should be used whenever an API reference is used in the documentation
97+
### `<see>` and `<cref/>` should be used whenever an API reference is used in the documentation
10898

10999
To ensure that API documentation is linked to whichever reference is used, `<see>` and `<cref/>` references should be used, this helps users navigate the methods, especially when looking up initializers or use of a property or method.
110100

111-
#### Avoid self referencing `<cref/>` unless it provides value
101+
### Avoid self referencing `<cref/>` unless it provides value
112102

113103
`<cref/>` blocks are there to add links and create references to other classes, functions and methods that help inform the developer for what those concepts are. Adding a `<cref/>` for the same class or property you are describing just creates a circular reference that does not add value.
114104

115105
References to other methods or properties in the same class is fine, just avoid self if possible.
116106

117-
#### Use descriptors in `<see/>` & `<cref/>` statements for better readability
107+
### Use descriptors in `<see/>` and `<cref/>` statements for better readability
118108

119109
By default, a `<cref/>` or `<see/>` reference will use only the type you are referencing when rendered to the user, e.g. `<cref="Album.Genre"/>` will render as `Genre`.
120110

121111
Instead, use the descriptor in the style to render what you actually mean, for example: `<cref="Album.Genre">Album.Genre</cref>` which will always render as `Album.Genre` which is much clearer, it is the same for `<see/>` tags.
122112

123-
#### 120 Width comments for easy reading
113+
### 120 width comments for easy reading
124114

125115
Comments should be limited to **120** width, with overflow moving to the next line to make reading easier, for example:
126116

@@ -135,7 +125,7 @@ and the y component uses 6 bits.
135125
> If the `cref` description would cause the line to exceed the 120 recommendation, this is generally ok, so long as the rendered line does not exceed the limit.
136126
> THe limit however, is more of a guideline than a hard rule, so common sense should be applied to keep the limit near 120 characters.
137127
138-
#### Use the packed multi-line stype with surrounding tags
128+
### Use the packed multi-line style with surrounding tags
139129

140130
To keep the documentation packed and readable, each parameter should be contained to a single line, for example:
141131

@@ -148,7 +138,7 @@ Creates a new instance of Bgr565.
148138
<param name="z">The z component</param>
149139
```
150140

151-
#### Interface documentation
141+
## Interface Documentation
152142

153143
If documentation is already provided by an interface or inherited class, then the `<inheritdoc />` tag should be used. Critically, **DO NOT** duplicate documentation as it increases maintenance later, for example:
154144

@@ -162,7 +152,7 @@ public void Dispose()
162152

163153
This applies to all derived elements within a class, property or method.
164154

165-
#### Inherited properties
155+
## Inherited Properties
166156

167157
Where a property or type is already documented in an `enum` or `static`, to avoid duplication the `<inheritdoc cref=""/>` style should be used, for example:
168158

@@ -185,7 +175,7 @@ Where a property or type is already documented in an `enum` or `static`, to avoi
185175
public static readonly VertexDeclaration VertexDeclaration;
186176
```
187177

188-
#### Protected methods requiring documentation by the linter
178+
## Protected Methods Requiring Documentation by the Linter
189179

190180
By default, we do not document Finalizers or other protected methods, the recommendation is to apply an empty `<summary />` tag to suppress the warnings raised by the linter, for example:
191181

Diff for: articles/getting_started/2_choosing_your_ide_rider.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ To get you started with Rider, here are the steps for setting up a new Rider Mon
4141
![Rider MonoGame template](./images/1_setting_up_your_development_environment/rider_new_solution_dialog.png)
4242

4343
4. Press "Create"
44-
5. You can now press `F5` to compile and debug you game, happy coding :)
44+
5. You can now press `F5` to compile and debug your game, happy coding :)
4545

4646
## Next Steps
4747

Diff for: articles/getting_started/5_adding_basic_code.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ JoystickState jstate = Joystick.GetState((int) PlayerIndex.One);
207207

208208
This code fetches the current first joystick state `Joystick.GetState((int) PlayerIndex.One)` and stores it into a variable called `jstate`.
209209

210-
### CHeck the current value of "Axis" 2
210+
### Check the current value of "Axis" 2
211211

212212
```csharp
213213
if (jstate.Axes[1] < 0)

Diff for: articles/getting_to_know/howto/HowTo_AutomaticRotation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How to manage automatic rotation and scaling
3-
description: A walkthrough what is involved in figuring out if two objects collide for MonoGame!
3+
description: Demonstrates how to manage rotation and scaling based on device orientation.
44
requireMSLicense: true
55
---
66

Diff for: articles/getting_to_know/howto/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This section details some of the operational aspects of running a MonoGame game.
4343

4444
* [How to manage automatic rotation and scaling](HowTo_AutomaticRotation.md)
4545

46-
A walkthrough what is involved in figuring out if two objects collide for MonoGame!
46+
Demonstrates how to manage rotation and scaling based on device orientation.
4747

4848
* [How to exit a Game Immediately](HowTo_ExitNow.md)
4949

Diff for: articles/getting_to_know/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Please check back regularly for updates and more details on the evolution of the
1313

1414
Provides simple definitions for most of the central concepts maintained by the MonoGame Framework.
1515

16-
The aim with this documentation section to to answer those most basic of questions, what is this thing and what is it for? Ultimately, these guides are here to help peel back the curtains as to what each feature of the MonoGame framework is for.
16+
The aim with this documentation section is to answer those most basic of questions, what is this thing and what is it for? Ultimately, these guides are here to help peel back the curtains as to what each feature of the MonoGame framework is for.
1717

1818
### [How To articles](howto/index.md)
1919

Diff for: docfx.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
"_hostname": "monogame.net",
6565
"_openGraphImage": "images/social_embed_image.png",
6666
"_description": "One framework for creating powerful cross-platform games.",
67-
"_appTitle": "MonoGame"
67+
"_appTitle": "MonoGame",
68+
"_enableSearch": true
6869
},
6970
"template": [
7071
"default",

0 commit comments

Comments
 (0)