mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 16:03:22 +01:00
Update convert-md2html.ps1
This commit is contained in:
parent
d300bd034b
commit
244f2904cf
11
Data/Templates/template.html
Normal file
11
Data/Templates/template.html
Normal 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>
|
@ -27,7 +27,7 @@ try {
|
|||||||
Write-Host "⏳ Converting..."
|
Write-Host "⏳ Converting..."
|
||||||
gci -r -i $FilePattern | foreach {
|
gci -r -i $FilePattern | foreach {
|
||||||
$TargetPath = $_.directoryname + "\" + $_.basename + ".html"
|
$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
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ converted in $Elapsed sec"
|
"✔️ converted in $Elapsed sec"
|
||||||
|
Loading…
Reference in New Issue
Block a user