Fix directory creation on re-render.

This commit is contained in:
Sergio Martínez Portela 2023-10-03 00:08:26 +02:00
parent bd644e3788
commit c588187ae3

View File

@ -573,7 +573,7 @@ def main(source_top, dest_top):
docs[filepath] = (doc, front_matter, out_path)
doc_full_path = os.path.join(dest_top, out_path)
print("Updated: {}.html".format(doc_full_path))
os.makedirs(os.path.dirname(doc_full_path), exist_ok=True)
os.makedirs(os.path.dirname(doc_full_path + '/index.html'), exist_ok=True)
# print("==", doc_full_path)
with open(doc_full_path + '/index.html', 'wt') as f:
try: