Render markdown files with a tool
This commit is contained in:
parent
1fc6a4092e
commit
8c2e0c66e2
9 changed files with 45 additions and 21 deletions
10
tools/rendermd.nim
Normal file
10
tools/rendermd.nim
Normal file
|
@ -0,0 +1,10 @@
|
|||
import std/[os, strutils]
|
||||
import markdown
|
||||
|
||||
for file in walkFiles("public/md/*.md"):
|
||||
let
|
||||
html = markdown(readFile(file))
|
||||
output = file.replace(".md", ".html")
|
||||
|
||||
output.writeFile(html)
|
||||
echo "Rendered ", output
|
Loading…
Add table
Add a link
Reference in a new issue