Files
nodeMap/scripts/md2html-seiten.ps1
2025-09-19 11:48:59 +02:00

15 lines
556 B
PowerShell

# Im Projekt-Root ausführen!
$source = "..\docs"
$target = ".\html-seiten"
# Zielordner anlegen
if (!(Test-Path $target)) { New-Item -ItemType Directory -Path $target }
# Alle .md-Dateien rekursiv durchgehen
Get-ChildItem -Path $source -Filter *.md -Recurse | ForEach-Object {
$relPath = $_.FullName.Substring($source.Length)
$outPath = Join-Path $target ($relPath -replace ".md$", ".html")
$outDir = Split-Path $outPath
if (!(Test-Path $outDir)) { New-Item -ItemType Directory -Path $outDir -Force }
pandoc $_.FullName -o $outPath
}