2 Commits

Author SHA1 Message Date
murat e74d70af1b feat(options): draft control 2026-06-16 21:29:25 +03:00
murat fcc6ef114a chore: remove unused variables 2026-06-16 21:05:21 +03:00
+2 -4
View File
@@ -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