fix(public directory): not deleting old files

fixed by deleting all html files in the public directory
This commit is contained in:
2026-06-17 17:15:35 +03:00
parent 5fbe2da916
commit a98460360c
+6 -2
View File
@@ -122,8 +122,12 @@ end
-- get index.html content
local indexFile = io.open("index.html"):read("*all")
-- remove and create "public/" directory
lfs.rmdir("public")
-- delete html files and create "public/" directory
for file in lfs.dir(currentDir .. "/public") do
if file:match("%.html$") then
os.remove(currentDir .. "/public/" .. file)
end
end
lfs.mkdir("public")
for index, _ in ipairs(markdownFiles) do