fix(public directory): not deleting old files
fixed by deleting all html files in the public directory
This commit is contained in:
@@ -122,8 +122,12 @@ end
|
|||||||
-- get index.html content
|
-- get index.html content
|
||||||
local indexFile = io.open("index.html"):read("*all")
|
local indexFile = io.open("index.html"):read("*all")
|
||||||
|
|
||||||
-- remove and create "public/" directory
|
-- delete html files and create "public/" directory
|
||||||
lfs.rmdir("public")
|
for file in lfs.dir(currentDir .. "/public") do
|
||||||
|
if file:match("%.html$") then
|
||||||
|
os.remove(currentDir .. "/public/" .. file)
|
||||||
|
end
|
||||||
|
end
|
||||||
lfs.mkdir("public")
|
lfs.mkdir("public")
|
||||||
|
|
||||||
for index, _ in ipairs(markdownFiles) do
|
for index, _ in ipairs(markdownFiles) do
|
||||||
|
|||||||
Reference in New Issue
Block a user