Skip to content

Commit 5618ca6

Browse files
committed
Add support for a PDF file
1 parent 0e4be18 commit 5618ca6

File tree

15 files changed

+507
-7
lines changed

15 files changed

+507
-7
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ jobs:
4545
- name: Run Build
4646
run: dotnet docfx ci.docfx.json
4747

48+
- name: Generate PDF
49+
run: dotnet docfx pdf ci.docfx.json
50+
51+
- name: Copy PDF to downloads and clean up
52+
run: |
53+
mkdir -p _site/downloads
54+
cp _site/pdf/MonoGameGuide.pdf _site/downloads/
55+
rm -rf _site/pdf
56+
4857
- name: Setup Pages
4958
uses: actions/configure-pages@v5
5059

api/index.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
11
---
2-
title: Reference
2+
title: API Reference
33
description: MonoGame API reference documentation.
44
---
55

6-
Welcome to the **MonoGame** reference documentation!
6+
Welcome to the **MonoGame** API reference documentation!
77

8-
This area provides detailed information on each class and method in the API.
8+
This section provides detailed information on all classes, methods, properties, and events available in the MonoGame framework.
99

10-
Please view the [documentation](../articles/index.md) for how to get started and step-by-step guidance.
10+
## Namespaces Overview
11+
12+
The MonoGame API is organized into the following primary namespaces:
13+
14+
| Namespace | Description |
15+
| --------- | ----------- |
16+
| **Microsoft.Xna.Framework** | Core framework classes including `Game`, `GameTime`, `Vector2`, `Matrix`, and fundamental types |
17+
| **Microsoft.Xna.Framework.Audio** | Audio playback, sound effects, and music management |
18+
| **Microsoft.Xna.Framework.Content** | Content loading and management with the `ContentManager` |
19+
| **Microsoft.Xna.Framework.Graphics** | Rendering, textures, shaders, and all graphics-related functionality |
20+
| **Microsoft.Xna.Framework.Input** | Keyboard, mouse, gamepad, and touch input handling |
21+
| **Microsoft.Xna.Framework.Media** | Media playback for songs and videos |
22+
23+
## Getting Started
24+
25+
If you're new to MonoGame, we recommend starting with the [documentation](../articles/index.md) for step-by-step tutorials and guidance before diving into the API reference.
26+
27+
## Common Entry Points
28+
29+
- **[Game](xref:Microsoft.Xna.Framework.Game)** - The main game class you inherit from
30+
- **[SpriteBatch](xref:Microsoft.Xna.Framework.Graphics.SpriteBatch)** - 2D rendering and sprite drawing
31+
- **[ContentManager](xref:Microsoft.Xna.Framework.Content.ContentManager)** - Loading game assets
32+
- **[GraphicsDeviceManager](xref:Microsoft.Xna.Framework.GraphicsDeviceManager)** - Graphics configuration

articles/getting_to_know/whatis/content_pipeline/CP_Architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The managed code objects created by the Content Processor are serialized into a
4040

4141
The format of data in the .XNB file is tightly coupled to the MonoGame Framework. It is not designed for use by other runtime libraries.
4242

43-
If you are intested in the format of the .XNB files you can view the [XNB specification](XNB Format.docx).
43+
If you are intested in the format of the .XNB files you can view the [XNB specification](XNB%20Format.docx).
4444

4545
### Runtime Components
4646

articles/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ This documentation [helps you to get started](getting_started/index.md) by provi
2020

2121
Please use the links at the top and left to navigate the documentation sections.
2222

23+
> [!TIP]
24+
> Looking for an offline version? [Download the PDF documentation](/downloads/MonoGameGuide.pdf).
25+
>
2326
> This documentation assumes that the reader has a basic knowledge of the C# programming language.
2427
2528
## What is MonoGame exactly?

build.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,14 @@ if (-not (Test-Path $FrameworkDll) -or -not (Test-Path $PipelineDll)) {
2121
Write-Host "Building DocFx..." -ForegroundColor Green
2222
dotnet docfx docfx.json
2323

24+
# Generate PDF
25+
Write-Host "Generating PDF..." -ForegroundColor Green
26+
dotnet docfx pdf docfx.json
27+
28+
# Copy PDF to downloads folder and clean up
29+
Write-Host "Copying PDF to downloads folder..." -ForegroundColor Green
30+
New-Item -ItemType Directory -Force -Path "_site/downloads" | Out-Null
31+
Copy-Item "_site/pdf/MonoGameGuide.pdf" "_site/downloads/"
32+
Remove-Item -Path "_site/pdf" -Recurse -Force
33+
2434
Write-Host "Build and documentation generation completed successfully!" -ForegroundColor Green

build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,14 @@ fi
2121
echo "Building DocFx..."
2222
dotnet docfx docfx.json
2323

24+
# Generate PDF
25+
echo "Generating PDF..."
26+
dotnet docfx pdf docfx.json
27+
28+
# Copy PDF to downloads folder and clean up
29+
echo "Copying PDF to downloads folder..."
30+
mkdir -p _site/downloads
31+
cp _site/pdf/MonoGameGuide.pdf _site/downloads/
32+
rm -rf _site/pdf
33+
2434
echo "Build and documentation generation completed successfully!"

ci.docfx.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
"roadmap/**/*.md",
4242
"roadmap/**/*.yml",
4343
"errors/**/*.md",
44+
"pdf/**/*.md",
45+
"pdf/**/*.yml",
4446
"toc.yml",
4547
"*.md"
4648
],
@@ -69,7 +71,8 @@
6971
"_openGraphImage": "images/social_embed_image.png",
7072
"_description": "One framework for creating powerful cross-platform games.",
7173
"_appTitle": "MonoGame",
72-
"_enableSearch": true
74+
"_enableSearch": true,
75+
"pdfFooterTemplate": "<div style='width: 100%; font-size: 10px; border-top: 1px solid #ccc; padding-top: 5px;'><div style='float: left;'>MonoGame Documentation</div><div style='float: right;'><span class='pageNumber'></span> / <span class='totalPages'></span></div></div>"
7376
},
7477
"template": [
7578
"default",

docfx.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
}
1111
],
1212
"dest": "api",
13+
"filter": "filterConfig.yml",
1314
"includePrivateMembers": false,
1415
"disableGitFeatures": false,
1516
"disableDefaultFilter": false,
@@ -41,6 +42,8 @@
4142
"roadmap/**/*.md",
4243
"roadmap/**/*.yml",
4344
"errors/**/*.md",
45+
"pdf/**/*.md",
46+
"pdf/**/*.yml",
4447
"toc.yml",
4548
"*.md"
4649
],
@@ -69,7 +72,8 @@
6972
"_openGraphImage": "images/social_embed_image.png",
7073
"_description": "One framework for creating powerful cross-platform games.",
7174
"_appTitle": "MonoGame",
72-
"_enableSearch": true
75+
"_enableSearch": true,
76+
"pdfFooterTemplate": "<div style='width: 100%; font-size: 11px; font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; border-top: 2px solid #e73c00; padding: 8px 20px 0 20px; display: flex; justify-content: space-between; align-items: center;'><span style='color: #e73c00; font-weight: 600;'>MonoGame Complete Reference Guide</span><span style='color: #666;'>Page <span class='pageNumber'></span> of <span class='totalPages'></span></span></div>"
7377
},
7478
"template": [
7579
"default",

filterConfig.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiRules:
2+
- exclude:
3+
uidRegex: ^CppNet
4+
type: Namespace

pdf/articles/toc.yml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
items:
2+
- name: Introduction
3+
href: ../index.md
4+
- name: Getting Started
5+
href: ../../articles/getting_started/index.md
6+
items:
7+
- name: Setting up MacOS
8+
href: ../../articles/getting_started/1_setting_up_your_os_for_development_macos.md
9+
- name: Setting up Linux
10+
items:
11+
- name: Setting up Arch Linux
12+
href: ../../articles/getting_started/1_setting_up_your_os_for_development_arch.md
13+
- name: Setting up Ubuntu
14+
href: ../../articles/getting_started/1_setting_up_your_os_for_development_ubuntu.md
15+
- name: Setting up Windows
16+
href: ../../articles/getting_started/1_setting_up_your_os_for_development_windows.md
17+
- name: Using Visual Studio
18+
href: ../../articles/getting_started/2_choosing_your_ide_visual_studio.md
19+
- name: Using Rider
20+
href: ../../articles/getting_started/2_choosing_your_ide_rider.md
21+
- name: Using Visual Studio Code
22+
href: ../../articles/getting_started/2_choosing_your_ide_vscode.md
23+
- name: Getting to know MonoGame
24+
href: ../../articles/getting_to_know/index.md
25+
items:
26+
- name: What is
27+
href: ../../articles/getting_to_know/whatis/index.md
28+
items:
29+
- name: Audio
30+
href: ../../articles/getting_to_know/whatis/audio/index.md
31+
- name: Content Pipeline
32+
href: ../../articles/getting_to_know/whatis/content_pipeline/index.md
33+
- name: Graphics
34+
href: ../../articles/getting_to_know/whatis/graphics/index.md
35+
- name: Input
36+
href: ../../articles/getting_to_know/whatis/input/index.md
37+
- name: The Game Loop
38+
href: ../../articles/getting_to_know/whatis/game_loop/index.md
39+
- name: Vector / Matrix / Quaternions
40+
href: ../../articles/getting_to_know/whatis/vector_matrix_quat/index.md
41+
- name: MonoGame Class Library
42+
href: ../../articles/getting_to_know/whatis/monogame_class_library/index.md
43+
- name: How to
44+
href: ../../articles/getting_to_know/howto/index.md
45+
items:
46+
- name: Audio
47+
href: ../../articles/getting_to_know/howto/audio/index.md
48+
- name: Content Pipeline
49+
href: ../../articles/getting_to_know/howto/content_pipeline/index.md
50+
- name: Graphics
51+
href: ../../articles/getting_to_know/howto/graphics/index.md
52+
- name: Input
53+
href: ../../articles/getting_to_know/howto/input/index.md
54+
- name: Advanced Topics
55+
items:
56+
- name: Packaging
57+
href: ../../articles/getting_started/packaging_games.md
58+
- name: Preparing for consoles
59+
href: ../../articles/getting_started/preparing_for_consoles.md
60+
- name: Using Development Nuget Packages
61+
href: ../../articles/getting_started/using_development_nuget_packages.md
62+
- name: Tools
63+
items:
64+
- name: Introduction
65+
href: ../../articles/getting_started/tools/index.md
66+
- name: MGCB
67+
href: ../../articles/getting_started/tools/mgcb.md
68+
- name: MGCB Editor
69+
href: ../../articles/getting_started/tools/mgcb_editor.md
70+
- name: MGFXC
71+
href: ../../articles/getting_started/tools/mgfxc.md
72+
- name: Content Pipeline
73+
items:
74+
- name: Introduction
75+
href: ../../articles/getting_started/content_pipeline/index.md
76+
- name: Why use the Content Pipeline
77+
href: ../../articles/getting_started/content_pipeline/why_content_pipeline.md
78+
- name: Using the Content Builder Project
79+
href: ../../articles/getting_started/content_pipeline/content_builder_project.md
80+
- name: Automating the Content Builder
81+
href: ../../articles/getting_started/content_pipeline/automating_content_builder.md
82+
- name: Using MGCB Editor
83+
href: ../../articles/getting_started/content_pipeline/using_mgcb_editor.md
84+
- name: Custom Effects
85+
href: ../../articles/getting_started/content_pipeline/custom_effects.md
86+
- name: TrueType fonts
87+
href: ../../articles/getting_started/content_pipeline/adding_ttf_fonts.md
88+
- name: Localization
89+
href: ../../articles/getting_started/content_pipeline/localization.md
90+
- name: Migration
91+
items:
92+
- name: Migrating from XNA
93+
href: ../../articles/migration/migrate_xna.md
94+
- name: Migrating from 3.7
95+
href: ../../articles/migration/migrate_37.md
96+
- name: Upgrading 3.8.x to latest
97+
href: ../../articles/migration/migrate_38.md
98+
- name: Updating Versions
99+
href: ../../articles/migration/updating_versions.md
100+
- name: Tutorials
101+
href: ../../articles/tutorials/index.md
102+
items:
103+
- name: Building 2D Games
104+
href: ../../articles/tutorials/building_2d_games/index.md
105+
items:
106+
- name: "01: What Is MonoGame?"
107+
href: ../../articles/tutorials/building_2d_games/01_what_is_monogame/index.md
108+
- name: "02: Getting Started"
109+
href: ../../articles/tutorials/building_2d_games/02_getting_started/index.md
110+
- name: "03: The Game1 File"
111+
href: ../../articles/tutorials/building_2d_games/03_the_game1_file/index.md
112+
- name: "04: Creating a Class Library"
113+
href: ../../articles/tutorials/building_2d_games/04_creating_a_class_library/index.md
114+
- name: "05: Content Pipeline"
115+
href: ../../articles/tutorials/building_2d_games/05_content_pipeline/index.md
116+
- name: "06: Working with Textures"
117+
href: ../../articles/tutorials/building_2d_games/06_working_with_textures/index.md
118+
- name: "07: Optimizing Texture Rendering"
119+
href: ../../articles/tutorials/building_2d_games/07_optimizing_texture_rendering/index.md
120+
- name: "08: The Sprite Class"
121+
href: ../../articles/tutorials/building_2d_games/08_the_sprite_class/index.md
122+
- name: "09: The AnimatedSprite Class"
123+
href: ../../articles/tutorials/building_2d_games/09_the_animatedsprite_class/index.md
124+
- name: "10: Handling Input"
125+
href: ../../articles/tutorials/building_2d_games/10_handling_input/index.md
126+
- name: "11: Input Management"
127+
href: ../../articles/tutorials/building_2d_games/11_input_management/index.md
128+
- name: "12: Collision Detection"
129+
href: ../../articles/tutorials/building_2d_games/12_collision_detection/index.md
130+
- name: "13: Working With Tilemaps"
131+
href: ../../articles/tutorials/building_2d_games/13_working_with_tilemaps/index.md
132+
- name: "14: Sound Effects and Music"
133+
href: ../../articles/tutorials/building_2d_games/14_soundeffects_and_music/index.md
134+
- name: "15: Audio Controller"
135+
href: ../../articles/tutorials/building_2d_games/15_audio_controller/index.md
136+
- name: "16: Working with SpriteFonts"
137+
href: ../../articles/tutorials/building_2d_games/16_working_with_spritefonts/index.md
138+
- name: "17: Scenes"
139+
href: ../../articles/tutorials/building_2d_games/17_scenes/index.md
140+
- name: "18: Texture Sampling"
141+
href: ../../articles/tutorials/building_2d_games/18_texture_sampling/index.md
142+
- name: "19: User Interface Fundamentals"
143+
href: ../../articles/tutorials/building_2d_games/19_user_interface_fundamentals/index.md
144+
- name: "20: Implementing UI with Gum"
145+
href: ../../articles/tutorials/building_2d_games/20_implementing_ui_with_gum/index.md
146+
- name: "21: Customizing Gum UI"
147+
href: ../../articles/tutorials/building_2d_games/21_customizing_gum_ui/index.md
148+
- name: "22: Snake Game Mechanics"
149+
href: ../../articles/tutorials/building_2d_games/22_snake_game_mechanics/index.md
150+
- name: "23: Completing the Game"
151+
href: ../../articles/tutorials/building_2d_games/23_completing_the_game/index.md
152+
- name: "24: Shaders"
153+
href: ../../articles/tutorials/building_2d_games/24_shaders/index.md
154+
- name: "25: Packaging Your Game for Distribution"
155+
href: ../../articles/tutorials/building_2d_games/25_packaging_game/index.md
156+
- name: "26: Publishing Your Game to itch.io"
157+
href: ../../articles/tutorials/building_2d_games/26_publish_to_itch/index.md
158+
- name: "27: Conclusion and Next Steps"
159+
href: ../../articles/tutorials/building_2d_games/27_conclusion/index.md
160+
- name: Console Access
161+
href: ../../articles/console_access.md
162+
- name: Help and Support
163+
href: ../../articles/help_and_support.md

0 commit comments

Comments
 (0)