🪲 [Fix]: Group overview pages now render as the section landing page#53
Merged
Marius Storhaug (MariusStorhaug) merged 5 commits intoJul 9, 2026
Merged
Conversation
A <Group>/<Group>.md overview page is now emitted as <Group>/index.md so it renders as the group's landing page (with navigation.indexes) instead of a page nested under the group. Nested groups supported; other pages unchanged. Adds an Action-Test assertion. Addresses PSModule/Process-PSModule#371.
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
July 9, 2026 11:41
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the documentation build pipeline so “group overview” markdown files (where the file basename matches its containing folder) are published as the section landing page (index.md), enabling navigation.indexes to link group headers to real content.
Changes:
- In
Build-PSModuleDocumentation.ps1, detect<Group>/<Group>.md(including nested groups) and publish it as<Group>/index.md. - In
Action-Test.yml, add a CI assertion that fixture group overviews publish asindex.mdand no longer as<Group>.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/helpers/Build-PSModuleDocumentation.ps1 |
Adds logic to remap folder-matching “group overview” pages to index.md in the docs output. |
.github/workflows/Action-Test.yml |
Adds a PowerShell validation step ensuring the new index.md publishing behavior is enforced in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
July 9, 2026 12:00
View session
The section index can now be authored either as <Group>/<Group>.md (mapped to index.md) or as <Group>/index.md directly (published as-is). If a folder has both, the explicit index.md wins and the <Group>.md stays a normal page. Fixture: SomethingElse now uses index.md to cover the passthrough path (PSModule still covers the mapped path).
9769cd4 to
465e074
Compare
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
July 9, 2026 12:03
View session
…arn on collision Detect explicit index pages case-insensitively (Where-Object -ieq) with de-duplication for case-sensitive runners; normalize any casing of index.md (Index.md/INDEX.md) to index.md in the output so MkDocs treats it as the section index; and emit a warning (instead of a silent overwrite) when a <Group>.md and an index.md coexist. Adds a Widgets/Index.md fixture to cover the casing path on Linux.
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
July 9, 2026 14:11
View session
Shorten the Write-Warning message to a single line under the 150-char PSScriptAnalyzer limit configured in .github/linters/.powershell-psscriptanalyzer.psd1.
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
July 9, 2026 14:16
View session
Enumerate public markdown once and derive the explicit-index folder set from it (no second tree walk). Group index pages per folder and throw a clear error when a folder has two that differ only by case (index.md + Index.md), instead of letting Move-Item -Force silently overwrite one. Addresses the remaining Copilot review comment.
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
July 9, 2026 14:22
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a command group has an overview page, it now becomes the landing page for that group in the generated documentation — the content shown when the group is selected in the navigation. Previously the overview was published as a separate page nested under the group (for example
.../Functions/Auth/Auth/), so selecting the group only expanded it and the overview was easy to miss.Fixed: Group overview pages are the section landing page
Give a command group an overview page and it now renders as that group's index on the docs site (
/Functions/<Group>/). You can author it either way:src/functions/public/<Group>/<Group>.md— named after the folder (the conventionTemplate-PSModuleships). It is published as the group'sindex.md.src/functions/public/<Group>/index.md— published as-is.For example,
src/functions/public/Auth/Auth.md(orAuth/index.md) now serves the Auth group's landing page at/Functions/Auth/instead of/Functions/Auth/Auth/.Existing modules that already use the
<Group>/<Group>.mdconvention (such asTemplate-PSModuleand theGitHubmodule'sAuthgroup) get the corrected behavior automatically — no source changes required. Nested groups work too (Auth/Context/Context.md→/Functions/Auth/Context/), and other hand-authored pages (e.g.PSModule/Notes.md) continue to publish as regular pages. If a folder somehow contains both a<Group>.mdand anindex.md, the explicitindex.mdis kept.Technical Details
src/helpers/Build-PSModuleDocumentation.ps1— in the "Move markdown files from public functions folder to docs output folder" step, a group overview whose basename matches its parent folder is written to<Group>/index.md; an existingindex.mdis published unchanged. Folders that already contain anindex.mdare collected before the move loop, so a sibling<Group>.mdis never moved over an author-providedindex.md(order-independent)..github/workflows/Action-Test.yml— added a step asserting the fixture group overviews publish asindex.md(PSModulevia the folder-name path,SomethingElsevia the explicitindex.mdpath) and no longer as<Group>.md.tests/srcTestRepo/src/functions/public/SomethingElse/SomethingElse.mdrenamed toindex.mdto cover the explicit-index.mdpath.navigation.indexes, already enabled in the modulemkdocs.ymltemplate, for the section header to link to the index page.