Skip to content

Commit ea19a3e

Browse files
🩹 [Patch]: Render group overview pages as section landing pages (#372)
Module documentation now renders a command group's overview page as that group's **section landing page** β€” the content shown when the group is selected in the navigation β€” instead of a separate page nested under it. This is delivered by bumping the `Document-PSModule` action, and the behavior is documented in the repository and module-source structure guidance. - Fixes #371 ## Changed: Group overview pages are the section landing page Bumped `PSModule/Document-PSModule` to v1.0.18 in `Build-Docs.yml`. v1.0.18 publishes a group's overview page as the section index (`/Functions/<Group>/`) rather than a page nested under the group. Authors can name the overview after its folder (`<Category>/<Category>.md`) or provide `<Category>/index.md` directly; either becomes the section landing page. ## Changed: Documentation Documented the behavior in `README.md`: added a bullet under the repository expectations and updated the `Category.md` annotation in the module source-structure tree. ## Technical Details - `.github/workflows/Build-Docs.yml`: `Document-PSModule@fb5d349 # v1.0.17` -> `@349090c # v1.0.18`. - `main` already carries v1.0.17 (install built modules at their real version) from #342; this PR advances the pin to v1.0.18, which delivers the section-index behavior. - The site config already enables `navigation.indexes`, so no `mkdocs.yml` change is required.
1 parent 0d7a2f0 commit ea19a3e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

β€Ž.github/workflows/Build-Docs.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module
3131

3232
- name: Document module
33-
uses: PSModule/Document-PSModule@fb5d349fa6e6ff8277b2eaf32a588cd97b234525 # v1.0.17
33+
uses: PSModule/Document-PSModule@349090c346feca4a7e5f51b6e57278a13ad52657 # v1.0.18
3434
with:
3535
Name: ${{ fromJson(inputs.Settings).Name }}
3636
WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }}

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,7 @@ Key expectations:
10721072
- Keep at least one exported function under `src/functions/public/` and corresponding tests in `tests/`.
10731073
- Optional folders (`assemblies`, `formats`, `types`, `variables`, and others) are processed automatically when present.
10741074
- Markdown files in `src/functions/public` subfolders become documentation pages alongside generated help.
1075+
- A group's overview page (`<Category>/<Category>.md` named after the folder, or `<Category>/index.md`) becomes that group's section landing page in the docs navigation.
10751076
- The build step compiles `src/` into a root module file and removes the original project layout from the artifact.
10761077
- Documentation generation mirrors the `src/functions/public` hierarchy so help content always aligns with source.
10771078

@@ -1100,7 +1101,7 @@ How the module is built.
11001101
β”‚ β”‚ └── public/ # Public commands documented and tested
11011102
β”‚ β”‚ β”œβ”€β”€ Category/ # Optional: organize commands into categories
11021103
β”‚ β”‚ β”‚ β”œβ”€β”€ Get-CategoryCommand.ps1 # Command file within category
1103-
β”‚ β”‚ β”‚ └── Category.md # Category overview merged into docs output
1104+
β”‚ β”‚ β”‚ └── Category.md # Group overview -> section landing page (or index.md)
11041105
β”‚ β”‚ β”œβ”€β”€ Get-PSModuleTest.ps1 # Example command captured by Microsoft.PowerShell.PlatyPS
11051106
β”‚ β”‚ β”œβ”€β”€ New-PSModuleTest.ps1 # Example command exported and tested
11061107
β”‚ β”‚ β”œβ”€β”€ Set-PSModuleTest.ps1 # Example command exported and tested

0 commit comments

Comments
Β (0)