diff --git a/docs/content/guides/structuring-your-module.md b/docs/content/guides/structuring-your-module.md index b70100b2..ae339d7c 100644 --- a/docs/content/guides/structuring-your-module.md +++ b/docs/content/guides/structuring-your-module.md @@ -67,6 +67,14 @@ Key expectations: - A group's overview page (`/.md` named after the folder, or `/index.md`) becomes that group's section landing page in the docs navigation. - The build step compiles `src/` into a root module file and removes the original project layout from the artifact. - Documentation generation mirrors the `src/functions/public` hierarchy so help content always aligns with source. +- Put the canonical public help URL first in each public command's comment-based help. For a command at `src/functions/public//.ps1`, use `https://psmodule.io//Functions///`. `Test-PSModule` enforces this as `PublicHelpLink`; additional `.LINK` entries may follow. +- Point each private helper's `.LINK` entry to the public command it supports, using that command's canonical grouped URL. + +### Grouping and published help URLs + +`Document-PSModule` generates command help and then moves each page to mirror the relative path under `src/functions/public/`. Moving an existing command into a group therefore changes its published URL from `https://psmodule.io//Functions//` to `https://psmodule.io//Functions///`. + +When regrouping a command, update its first public `.LINK`, every private-helper `.LINK` that points to it, and any other references to the old URL in the same change. `Document-PSModule` does not create redirects for the old path; arrange a redirect separately in the publishing layer when existing links must continue to work. ## Module source code structure