We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e03949b commit bf084cbCopy full SHA for bf084cb
replace_index_with_redirect.py
@@ -3,7 +3,6 @@
3
4
import os
5
import os.path as osp
6
-import shutil
7
8
publications_text = """
9
<!DOCTYPE html>
@@ -18,6 +17,7 @@
18
17
</html>
19
"""
20
21
-if osp.isfile("output/index.html"):
22
- with open("output/index.html", "w") as file_handle:
23
- file_handle.write(publications_text)
+# Ensure output/ exists, then write the redirect index.html
+os.makedirs("output", exist_ok=True)
+with open("output/index.html", "w") as file_handle:
+ file_handle.write(publications_text)
0 commit comments