From 4705c89cb447e72ee2fcf5fc7514ee4089759f06 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 2 Aug 2026 18:58:36 +0200 Subject: [PATCH] Document that domain grouping changes a command's canonical help URL Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/docs/Modules/Standards.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/docs/Modules/Standards.md b/src/docs/Modules/Standards.md index 0124b4e..2bbf252 100644 --- a/src/docs/Modules/Standards.md +++ b/src/docs/Modules/Standards.md @@ -49,6 +49,9 @@ Layout rules: - **No nested functions.** Do not define helper functions inside other functions. Extract helper logic to a separate function file and decide whether it belongs in `src/functions/private//` (internal-only) or `src/functions/public//` (part of the module API). - **Declare dependencies where they are used.** Use `#Requires -Modules ` at the top of each function file that needs an external module. Do not add `RequiredModules` to `src/manifest.psd1` — the build collects all `#Requires` declarations automatically and writes them into the compiled manifest. Entries in `src/manifest.psd1` are silently ignored for this purpose. - **Group documentation pages with source.** Place a `.md` file alongside the function files in each `src/functions/public//` folder to provide a category overview in generated documentation. +- **Point `.LINK` at the grouped page.** A public command's generated page is published under its group, so its canonical URL is `https://psmodule.io//Functions///`. Every command's first `.LINK` uses that form, and each private helper links the public command it serves. `Test-PSModule` enforces it as `PublicHelpLink`. + +Grouping an existing module changes those URLs. Moving a command into a group folder moves its generated page, so every `.LINK` in the module — the public commands and all the private helpers pointing at them — must be updated in the same change, and any published reference to the old flat `Functions//` address stops resolving. Treat the link update and any redirect as part of the regrouping, not as follow-up work. ## Module naming