mirror of
https://gitlab.com/MisterBiggs/blog-static.git
synced 2025-09-19 12:12:48 +00:00
fixed bug in coffee.py thanks Matthew♥
This commit is contained in:
@@ -11,10 +11,14 @@ widget = """
|
||||
for filename in glob.glob("*/index.html", recursive=True):
|
||||
print(filename)
|
||||
with open(filename, "r+", encoding="utf-8") as f:
|
||||
f.writelines(f.read().replace("</head>", widget))
|
||||
txt = f.read().replace("</head>", widget)
|
||||
f.seek(0)
|
||||
f.writelines(txt)
|
||||
# print(f.read())
|
||||
|
||||
# Add widget to home page
|
||||
with open("index.html", "r+", encoding="utf-8") as f:
|
||||
f.writelines(f.read().replace("</head>", widget))
|
||||
txt = f.read().replace("</head>", widget)
|
||||
f.seek(0)
|
||||
f.writelines(txt)
|
||||
#
|
||||
|
Reference in New Issue
Block a user