Generates and updates function documentation using PlatyPS, and creates an index for module functions.
write-mfModuleDocs [[-Path] <String>] [-ModuleName] <String> [[-docsFolder] <String>]
[[-functionsFolder] <String>] [-includeChangeLog] [-skipIndex] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
This function automates documentation generation based on module functions, leveraging PlatyPS to create and update Markdown help files. It also builds an `index.md` file for organizing documentation, making it easier to integrate with GitHub Pages or other documentation platforms. Additionally, if specified, it includes a changelog based on Git commits.
write-mfModuleDocs -ModuleName 'MyCustomModule' -includeChangeLog
Builds documentation for `MyCustomModule` and includes a full Git-based changelog (`changeLog.md`) alongside function help files.
write-mfModuleDocs -ModuleName 'MyCustomModule' -skipIndex
Generates function documentation without updating `index.md`.
The root path where documentation should be stored. Defaults to the current directory.
Type: String
Parameter Sets: (All)
Aliases: modulePath
Required: False
Position: 1
Default value: $(get-item .).fullname
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
The name of the PowerShell module for which documentation should be generated.
Type: String
Parameter Sets: (All)
Aliases: module
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the subfolder within `docsFolder` where function-specific documentation should be stored. Defaults to `functions`.
Type: String
Parameter Sets: (All)
Aliases: docsPath
Required: False
Position: 3
Default value: Docs
Accept pipeline input: False
Accept wildcard characters: False
Specifies the subfolder within `docsFolder` where function-specific documentation should be stored. Defaults to `functions`.
Type: String
Parameter Sets: (All)
Aliases: functionsPath
Required: False
Position: 4
Default value: Functions
Accept pipeline input: False
Accept wildcard characters: False
If specified, retrieves and includes a Markdown changelog based on Git commit history.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
If specified, skips creating or updating the `index.md` file.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Adrian Andersson