PlatyPS Workflow
Import the module being documented
Import-Module .\ManageIssues.psd1Create new markdown files (cmdlet and module)
$newMarkdownHelpSplat = @{ Module = 'ManageIssues' AlphabeticParamsOrder = $true UseFullTypeName = $true OutputFolder = '.\docs' WithModulePage = $true } New-MarkdownHelp @newMarkdownHelpSplatPlatyPS creates placeholders for you to fill in metadata, descriptions, and examples. The PowerShell help system also allows for plain-text conceptual help files (about topics). PlatyPS includes the
New-MarkdownAboutHelpcmdlet to create a structured Markdown template for a new about file, but you must convert the markdown toabout_*.help.txtfiles manually.Edit markdown files to add descriptions, examples, links, notes, etc.
Metadata in
<Module>.mdand<Cmdlet-Name>.mdfiles is used when compiling the MAML files. The markdown files aren’t used directly by the help system. It’s important that the metadata is correct for the help system to work properly.Compile markdown into MAML
$newExternalHelpSplat = @{ Path = '.\docs' OutputPath = '.\help' } New-ExternalHelp @newExternalHelpSplatTest the MAML
Get-HelpPreview -Path .\help\ManageIssues-help.xmlCreate the module help CAB/ZIP and HelpInfo XML files.
mkdir .\help\cab $newExternalHelpCabSplat = @{ CabFilesFolder = '.\help' LandingPagePath = '.\docs\ManageIssues.md' OutputFolder = '.\help\cab' } New-ExternalHelpCab @newExternalHelpCabSplatThe CabFilesFolder location must contain the MAML files and any
about_*.help.txtfiles that you want to publish for the module. For a script-based module, there is usually only one MAML file. However, if your module contains submodules or has cmdlets in compiled assemblies, there will be multiple MAML files.Publish CAB and XML to web service
Copy the files to the web server.
For more information, see Create XML-based help using PlatyPS.
