aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2021-03-15 12:07:27 +0000
committeralex <alex@pdp7.net>2021-03-15 12:07:27 +0000
commit9a091cb2ff2b83f45aefdcf754dce14c9bc284e2 (patch)
treedf2297622df75aa22c2e198476145d20ac3dbdc4 /build.py
parent01ab47968c0b620f8012c0d2dc969f5788c0d581 (diff)
Add robots.txt to prevent scraping of full Geminispace
Diffstat (limited to 'build.py')
-rwxr-xr-xbuild.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/build.py b/build.py
index 27166721..4d3ea887 100755
--- a/build.py
+++ b/build.py
@@ -108,6 +108,10 @@ def build():
posts = load_posts()
create_index(sorted(posts, key=lambda p: p.posted, reverse=True))
create_individual_posts(posts)
+ for directory, _, files in os.walk("static/gmi"):
+ new_dir = directory.replace("static/gmi", "build/gmi")
+ for file in files:
+ shutil.copy(f"{directory}/{file}", f"{new_dir}/{file}")
if __name__ == "__main__":
build()