Oops, my test server wasn't updating files

This commit is contained in:
Govindas 2022-01-22 12:01:09 +02:00
parent 0673f6a790
commit e5583310cd

View File

@ -23,7 +23,7 @@ def generateNavigationBar(lines):
navbar = E
for line in lines:
split = line.strip().split(";", 1)
navbar.li(HTML("<a href='" + split[1] + "'>" + split[0]))
navbar = navbar.li(HTML("<a href='" + split[1] + "'>" + split[0] + "</a>"))
if os.path.exists("./navbar"):
with open("./navbar", 'r') as navbarfile:
@ -45,9 +45,9 @@ for file in os.listdir("./"):
if pagetitle != homepage:
foldername = "/" + pagetitle.replace(" ", "-").lower()
os.mkdir("./website-output" + foldername)
print(foldername)
with open("./website-output" + foldername + "/index.html", 'w') as newpage:
if 'navbar' in globals():
newpage.write(str(E.ul(navbar)))
newpage.write(str(E.ul(navbar)) + str(doc))
else:
newpage.write(str(doc))