You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click the '[Use this template](https://github.com/jdarcyryan/PSModuleTemplate/generate)' button at the top of this repository to create a new repository based on this template.
@@ -71,6 +73,52 @@ This runs all pester tests against the built module.
71
73
make pester
72
74
```
73
75
76
+
## Module Structure
77
+
78
+
The module loads in this order: **classes → enums → private → public → completers**.
79
+
80
+
### Classes
81
+
82
+
Defined in `classes/` and loaded in the order specified in `classes/classes.psd1`. Order matters — parent classes must be listed before children. Supports `.ps1`, `.cs`, and `.dll` files.
83
+
84
+
### Enums
85
+
86
+
Defined in `enums/` as `.ps1` files and loaded automatically.
87
+
88
+
```powershell
89
+
# enums/LogLevel.ps1
90
+
enum LogLevel {
91
+
Debug
92
+
Info
93
+
Warning
94
+
Error
95
+
Critical
96
+
}
97
+
```
98
+
99
+
### Private Functions
100
+
101
+
Defined in `private/`, one function per file. Available within the module but not exported.
102
+
103
+
### Public Functions
104
+
105
+
Defined in `public/`, one function per file, using the `Verb-Noun` convention. To export these functions, they must be included in the `FunctionsToExport` array inside the module manifest.
106
+
107
+
### Argument Completers
108
+
109
+
Defined in `completers/` and loaded last. Provide tab-completion for function parameters. Use an underscore naming convention (e.g. `Complete_ParameterName.ps1`) — they are excluded from Pester naming and help tests.
Module dependencies are managed using [PSDepend](https://github.com/RamblingCookieMonster/PSDepend).
@@ -135,6 +183,30 @@ To use this workflow:
135
183
After merging to master, markdown files for each public function in the module will be created.
136
184
Ensure Get-Help is accurate and populated, as this will be referenced to create the documentation.
137
185
186
+
## GitHub Pages
187
+
188
+
This template includes a workflow that can automatically generate a documentation site for your module using GitHub Pages. The site is built from your repository's markdown files and includes your README as the homepage, exported command documentation, releases fetched from the GitHub API, and any LICENSE, CONTRIBUTING, or CODE_OF_CONDUCT files.
189
+
190
+
### Enabling GitHub Pages
191
+
192
+
1. Go to **Settings** → **Pages** in your repository.
193
+
2. Under **Build and deployment**, set the source to **GitHub Actions**.
194
+
3. Push to `main` or manually trigger the workflow from the **Actions** tab.
195
+
196
+
The site will be published at `https://<owner>.github.io/<repo>/`.
197
+
198
+
### What gets included
199
+
200
+
The Pages workflow only publishes markdown files (`.md`), license files (`LICENSE`, `LICENSE.txt`), and image assets from the `assets/` folder. Everything else in your repository (source code, build scripts, tests, etc.) is excluded.
201
+
202
+
### Favicon
203
+
204
+
To add a favicon to your site, place an SVG file at `assets/favicon.svg` in your repository.
205
+
206
+
### How it works
207
+
208
+
The workflow dynamically generates the site at build time — no Jekyll configuration files need to be committed to your repository. It detects which community files exist (LICENSE, CONTRIBUTING, CODE_OF_CONDUCT) and conditionally adds them to the navigation. If GitHub Pages is not enabled, the workflow skips gracefully without failing.
209
+
138
210
## Contributing
139
211
140
212
We welcome contributions! Please see [CONTRIBUTING](CONTRIBUTING.md) for details on how to contribute to this project.
@@ -153,4 +225,4 @@ Copyright (c) 2026 James D'Arcy Ryan
153
225
154
226
## Acknowledgments
155
227
156
-
Thank you to all contributors who help improve this template!
228
+
Thank you to all contributors who help improve this template!
0 commit comments