Skip to content

Instantly share code, notes, and snippets.

@pierew
Created August 20, 2017 20:39
Show Gist options
  • Save pierew/9dad696abf82c8a6f5f94b2fe63732cd to your computer and use it in GitHub Desktop.
Save pierew/9dad696abf82c8a6f5f94b2fe63732cd to your computer and use it in GitHub Desktop.
Generating PanDoc HTML Conversion in actual Directory
If (Test-Path "$(Get-Location)\pandoc_html") {
Remove-Item -Recurse "$(Get-Location)\pandoc_html" -Force
}
New-Item -Path "$(Get-Location)\pandoc_html" -ItemType directory
Get-ChildItem "$(Get-Location)\*.md" | ForEach-Object {
pandoc $_ -f markdown -t html -s -o "$(Get-Location)\pandoc_html\$($_.BaseName).html" | Out-Null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment