Skip to content

MonoGame/docs.monogame.github.io

Repository files navigation

docs.monoGame.github.io

This repository contains the documentation for MonoGame.

Building From Source

The MonoGame website is built using the .NET tool 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

  1. .NET SDK version 6.0 or higher installed (download) (recommended 8.0+)

With your environment setup properly, the following explains how to build from source

  1. Clone this repository

    git clone https://github.com/MonoGame/docs.monogame.github.io.git
  2. Install DotNet dependencies

    dotnet tool restore
  3. Build and serve the documentation

    The easiest way to build and serve the documentation locally is using the provided scripts:

    On Windows (PowerShell):

    .\serve.ps1

    On macOS/Linux (Bash):

    ./serve.sh

    These scripts will automatically:

    • Initialize MonoGame submodules if needed
    • Build required assemblies for API documentation
    • Generate the complete documentation
    • Start a local web server
  4. Alternative: Build-only (without serving)

    If you only want to build the documentation without serving:

    On Windows (PowerShell):

    .\build.ps1

    On macOS/Linux (Bash):

    ./build.sh

    Or manually using DocFX:

    dotnet docfx docfx.json
    

Note

The build scripts automatically handle submodule initialization and MonoGame assembly building. They only perform these steps when necessary, making subsequent builds faster.

Note

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)

Document styling

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:

  • Document Frontmatter now drives the Title, Description and whether or not a MS license statement is needed in the document.

    ---
    title: How to create a Render Target
    description: Demonstrates how to create a render target using a RenderTarget2D.
    requireMSLicense: true
    ---
    
  • DocFX admonitions are supported for adding Notes, Info Panels etc, for more details see the MS docs on DocFX markdown:

    DocFX Markdown style guide

As an example of a document written using the above notes, please refer to the HowTo: Create a Render Target tutorial

Tip

No additional text is needed at the bottom of document pages as the licenses and requirements are automatically added by the DocFX build system

LICENSE

The MonoGame project is under the Microsoft Public License except for a few portions of the code. See the LICENSE file for more details.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 48