Skip to content

Commit 80b942b

Browse files
committed
Add support for a PDF file
1 parent 8879561 commit 80b942b

12 files changed

Lines changed: 336 additions & 3 deletions

File tree

.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/MonoGameDocs.pdf _site/downloads/
55+
rm -rf _site/pdf
56+
4857
- name: Setup Pages
4958
uses: actions/configure-pages@v5
5059

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/MonoGameDocs.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/MonoGameDocs.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/MonoGameDocs.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: 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",

pdf/articles/toc.yml

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
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: Samples and Demos
101+
href: ../../articles/samples.md
102+
- name: Tutorials
103+
href: ../../articles/tutorials/index.md
104+
items:
105+
- name: Building 2D Games
106+
href: ../../articles/tutorials/building_2d_games/index.md
107+
items:
108+
- name: "01: What Is MonoGame?"
109+
href: ../../articles/tutorials/building_2d_games/01_what_is_monogame/index.md
110+
- name: "02: Getting Started"
111+
href: ../../articles/tutorials/building_2d_games/02_getting_started/index.md
112+
- name: "03: The Game1 File"
113+
href: ../../articles/tutorials/building_2d_games/03_the_game1_file/index.md
114+
- name: "04: Creating a Class Library"
115+
href: ../../articles/tutorials/building_2d_games/04_creating_a_class_library/index.md
116+
- name: "05: Content Pipeline"
117+
href: ../../articles/tutorials/building_2d_games/05_content_pipeline/index.md
118+
- name: "06: Working with Textures"
119+
href: ../../articles/tutorials/building_2d_games/06_working_with_textures/index.md
120+
- name: "07: Optimizing Texture Rendering"
121+
href: ../../articles/tutorials/building_2d_games/07_optimizing_texture_rendering/index.md
122+
- name: "08: The Sprite Class"
123+
href: ../../articles/tutorials/building_2d_games/08_the_sprite_class/index.md
124+
- name: "09: The AnimatedSprite Class"
125+
href: ../../articles/tutorials/building_2d_games/09_the_animatedsprite_class/index.md
126+
- name: "10: Handling Input"
127+
href: ../../articles/tutorials/building_2d_games/10_handling_input/index.md
128+
- name: "11: Input Management"
129+
href: ../../articles/tutorials/building_2d_games/11_input_management/index.md
130+
- name: "12: Collision Detection"
131+
href: ../../articles/tutorials/building_2d_games/12_collision_detection/index.md
132+
- name: "13: Working With Tilemaps"
133+
href: ../../articles/tutorials/building_2d_games/13_working_with_tilemaps/index.md
134+
- name: "14: Sound Effects and Music"
135+
href: ../../articles/tutorials/building_2d_games/14_soundeffects_and_music/index.md
136+
- name: "15: Audio Controller"
137+
href: ../../articles/tutorials/building_2d_games/15_audio_controller/index.md
138+
- name: "16: Working with SpriteFonts"
139+
href: ../../articles/tutorials/building_2d_games/16_working_with_spritefonts/index.md
140+
- name: "17: Scenes"
141+
href: ../../articles/tutorials/building_2d_games/17_scenes/index.md
142+
- name: "18: Texture Sampling"
143+
href: ../../articles/tutorials/building_2d_games/18_texture_sampling/index.md
144+
- name: "19: User Interface Fundamentals"
145+
href: ../../articles/tutorials/building_2d_games/19_user_interface_fundamentals/index.md
146+
- name: "20: Implementing UI with Gum"
147+
href: ../../articles/tutorials/building_2d_games/20_implementing_ui_with_gum/index.md
148+
- name: "21: Customizing Gum UI"
149+
href: ../../articles/tutorials/building_2d_games/21_customizing_gum_ui/index.md
150+
- name: "22: Snake Game Mechanics"
151+
href: ../../articles/tutorials/building_2d_games/22_snake_game_mechanics/index.md
152+
- name: "23: Completing the Game"
153+
href: ../../articles/tutorials/building_2d_games/23_completing_the_game/index.md
154+
- name: "24: Shaders"
155+
href: ../../articles/tutorials/building_2d_games/24_shaders/index.md
156+
- name: "25: Packaging Your Game for Distribution"
157+
href: ../../articles/tutorials/building_2d_games/25_packaging_game/index.md
158+
- name: "26: Publishing Your Game to itch.io"
159+
href: ../../articles/tutorials/building_2d_games/26_publish_to_itch/index.md
160+
- name: "27: Conclusion and Next Steps"
161+
href: ../../articles/tutorials/building_2d_games/27_conclusion/index.md
162+
- name: Console Access
163+
href: ../../articles/console_access.md
164+
- name: Help and Support
165+
href: ../../articles/help_and_support.md

pdf/cover.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
_disableContribution: true
3+
_disableBreadcrumb: true
4+
_disableAffix: true
5+
_disableToc: true
6+
_disableNavbar: true
7+
_disableFooter: true
8+
---
9+
10+
<style>
11+
@page { margin: 0 }
12+
html, body {
13+
margin: 0;
14+
padding: 0;
15+
height: 100%;
16+
print-color-adjust: exact;
17+
-webkit-print-color-adjust: exact;
18+
}
19+
.cover-page {
20+
display: flex;
21+
flex-direction: column;
22+
justify-content: center;
23+
align-items: center;
24+
height: 100vh;
25+
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
26+
color: white;
27+
text-align: center;
28+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
29+
}
30+
.logo {
31+
width: 200px;
32+
height: auto;
33+
margin-bottom: 40px;
34+
}
35+
.title {
36+
font-size: 48px;
37+
font-weight: bold;
38+
margin-bottom: 20px;
39+
color: #e94560;
40+
}
41+
.subtitle {
42+
font-size: 24px;
43+
margin-bottom: 40px;
44+
color: #a0a0a0;
45+
}
46+
.description {
47+
font-size: 18px;
48+
max-width: 600px;
49+
line-height: 1.6;
50+
color: #cccccc;
51+
}
52+
.footer {
53+
position: absolute;
54+
bottom: 60px;
55+
font-size: 14px;
56+
color: #888888;
57+
}
58+
</style>
59+
60+
<div class="cover-page">
61+
<img src="../images/logo_light.svg" alt="MonoGame Logo" class="logo" />
62+
<div class="title">MonoGame Documentation</div>
63+
<div class="subtitle">Complete Reference Guide</div>
64+
<div class="description">
65+
One framework for creating powerful cross-platform games.
66+
Build games for desktop, mobile, and consoles using C# and .NET.
67+
</div>
68+
<div class="footer">
69+
Copyright © 2009-2026 MonoGame Foundation, Inc.
70+
</div>
71+
</div>

pdf/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Documentation
3+
description: Welcome to the MonoGame documentation!
4+
---
5+
6+
Welcome to the MonoGame documentation

0 commit comments

Comments
 (0)