Compare commits
2 Commits
87bbceb647
...
e74d70af1b
| Author | SHA1 | Date | |
|---|---|---|---|
| e74d70af1b | |||
| fcc6ef114a |
@@ -109,14 +109,13 @@ end
|
||||
|
||||
-- get index.html content
|
||||
local indexFile = io.open("index.html"):read("*all")
|
||||
local siteName
|
||||
local siteTitle
|
||||
|
||||
-- remove and create "public/" directory
|
||||
lfs.rmdir("public")
|
||||
lfs.mkdir("public")
|
||||
|
||||
for index, _ in ipairs(markdownFiles) do
|
||||
if markdownFiles[index].options["draft"] ~= "yes" then
|
||||
local workDir = lfs.currentdir()
|
||||
-- create html file for that md file
|
||||
local htmlFile = io.open(workDir .. "/public/" .. markdownFiles[index].fileName .. ".html", 'w')
|
||||
@@ -239,7 +238,6 @@ for index, _ in ipairs(markdownFiles) do
|
||||
s = s:gsub("`(.-)`", "<code>%1</code>")
|
||||
-- horizontal rule
|
||||
s = s:gsub("%-%-%-", "<hr>")
|
||||
-- TODO: p for normal text
|
||||
|
||||
return s
|
||||
end
|
||||
@@ -267,4 +265,4 @@ for index, _ in ipairs(markdownFiles) do
|
||||
print("Error: Cannot create html file for " .. markdownFiles[index].filePath)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user