Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .build/tasks/generateHelp.PlatyPS.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function Get-GenerateHelpPlatyPSVariables
$script:HelpSourceFolder = Get-SamplerAbsolutePath -Path $HelpSourceFolder -RelativeTo $ProjectPath
"`tHelp Source Folder = '$HelpSourceFolder'"

$script:HelpOutputFolder = Get-SamplerAbsolutePath -Path $HelpOutputFolder -RelativeTo $OutputDirectory
$script:HelpOutputFolder = Get-SamplerAbsolutePath -Path $HelpOutputFolder -RelativeTo $OutputDirectory
"`tHelp output Folder = '$HelpOutputFolder'"

if ($ModuleVersion)
Expand Down Expand Up @@ -85,30 +85,27 @@ Task Generate_MAML_from_built_module {

Get-GenerateHelpPlatyPSVariables

$AlphabeticParamOrder = $true
$WithModulePage = $true
$ExcludeDontShow = $true

$generateHelpCommands = @"
`$env:PSModulePath = '$Env:PSModulePath'
`$targetModule = Import-Module -Name '$ProjectName' -ErrorAction Stop -Passthru

`$newMarkdownHelpParams = @{
Module = '$ProjectName'
ModuleInfo = `$targetModule
OutputFolder = '$DocOutputFolder'
AlphabeticParamsOrder = `$$AlphabeticParamOrder
WithModulePage = `$$WithModulePage
ExcludeDontShow = `$$ExcludeDontShow
Force = `$true
ErrorAction = 'Stop'
Locale = '$HelpCultureInfo'
HelpVersion = '$ModuleVersion'
HelpVersion = '$ModuleVersionFolder'
}

New-MarkdownHelp @newMarkdownHelpParams
New-ExternalHelp -Path "$DocOutputFolder" -OutputPath "$HelpOutputCultureFolder" -Force
New-MarkdownCommandHelp @newMarkdownHelpParams
`$allFiles = Get-ChildItem -Path '$DocOutputFolder' -Recurse -Filter "*.md"
`$import = Measure-PlatyPSMarkdown -Path `$allFiles | Where-Object Filetype -match 'CommandHelp' | Import-MarkdownCommandHelp -Path {`$_.FilePath}
Export-MamlCommandHelp -CommandHelp `$import -OutputFolder "$HelpOutputCultureFolder" -Force
"@

Write-Build -Color DarkGray -Text "$generateHelpCommands"
$sb = [ScriptBlock]::create($generateHelpCommands)

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.118.4] - 2025-05-01

- Using Microsoft.PowerShell.PlatyPS to build documentation

## [0.118.3] - 2025-04-29

### Changed
Expand Down