10 lines
505 B
PowerShell
10 lines
505 B
PowerShell
|
|||
|
|
$files = Get-ChildItem -Path "content" -Recurse -Filter "*.md"
|
||
|
|
foreach ($file in $files) {
|
||
|
|
$content = Get-Content $file.FullName -Raw -Encoding UTF8
|
||
|
|
if ($content -match "status:\s*hidden") {
|
||
|
|
$newContent = $content -replace "status:\s*hidden`r`n", "" -replace "status:\s*hidden`n", "" -replace "status:\s*`"hidden`"`r`n", "" -replace "status:\s*`"hidden`"`n", ""
|
||
|
|
Set-Content -Path $file.FullName -Value $newContent -Encoding UTF8
|
||
|
|
Write-Host "Updated $($file.Name)"
|
||
|
|
}
|
||
|
|
}
|