File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 5858 try {
5959 Write-Host " $ ( $command.Name ) " - NoNewline
6060 $params = @ {
61- CommandInfo = $command
62- OutputFolder = $docsOutputFolder
63- Encoding = ' utf8'
64- ProgressAction = ' SilentlyContinue'
65- ErrorAction = ' Stop'
66- Force = $true
61+ CommandInfo = $command
62+ OutputFolder = $docsOutputFolder
63+ Encoding = ' utf8'
64+ ProgressAction = ' SilentlyContinue'
65+ ErrorAction = ' Stop'
66+ Force = $true
6767 }
6868 $null = New-MarkdownCommandHelp @params
6969 Write-Host ' - ✓' - ForegroundColor Green
129129 Move-Item - Path $file.FullName - Destination $docsFilePath - Force
130130 }
131131
132+ Write-Host ' ::group::Build docs - Fix frontmatter title'
133+ Get-ChildItem - Path $moduleDocsFolder - Recurse - Force - Include ' *.md' | ForEach-Object {
134+ $content = Get-Content - Path $_.FullName - Raw
135+ # Replace 'title:' with 'ms.title:' in frontmatter only (between --- markers)
136+ $content = $content -replace ' (?s)^(---.*?)title:(.*?---)' , ' $1ms.title:$2'
137+ $content | Set-Content - Path $_.FullName
138+ }
139+
132140 Write-Host ' ::group::Build docs - Move markdown files from source files to docs'
133141 $moduleDocsFolder = Join-Path $DocsOutputFolder.FullName $ModuleName
134142 Get-ChildItem - Path $PublicFunctionsFolder - Recurse - Force - Include ' *.md' | ForEach-Object {
You can’t perform that action at this time.
0 commit comments