Skip to content

How to generate documentation

Stuart Malcolm edited this page Nov 12, 2021 · 5 revisions

How to generate markdown docs from PS module help comments

The help documentation is generated using the PlatyPS module

First-time (once only) creation of docs

  • Install platyPS module from the PowerShell Gallery:
Install-Module -Name platyPS -Scope CurrentUser
Import-Module platyPS
  • Create initial Markdown help for powerSAS module:
# powerSAS module must already be imported in the session
cd path\to\powerSAS
Import-Module .\powerSAS
New-MarkdownHelp -Module powerSAS -OutputFolder .\docs
  • Edit markdown files in .\docs folder and populate {{ ... }} placeholders with missed help content.
  • Create external help from markdown help
New-ExternalHelp .\docs -OutputPath en-US\

Update existing documentation

When module code changes, update markdown help with:

cd \path\to\powerSAS
Import-Module .\powerSAS -Force
Update-MarkdownHelp .\docs
New-ExternalHelp .\docs -OutputPath en-US\ -Force

Once documentation is updated then git add and commit the changes