# 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 }