Update convert-md2html.ps1

This commit is contained in:
Markus Fleschutz 2023-04-11 22:51:40 +02:00
parent d300bd034b
commit 244f2904cf
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='$date-meta$'>
<title>$title$</title>
</head>
<body>
$body$
</body>
</html>

View File

@ -27,7 +27,7 @@ try {
Write-Host "⏳ Converting..."
gci -r -i $FilePattern | foreach {
$TargetPath = $_.directoryname + "\" + $_.basename + ".html"
pandoc -f md -s $_.name -o $TargetPath
pandoc --standalone --template "$PSScriptRoot/../Data/Templates/template.html" -s $_.name -o $TargetPath
}
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
"✔️ converted in $Elapsed sec"