diff options
| author | alex <alex@pdp7.net> | 2021-03-15 12:07:27 +0000 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2021-03-15 12:07:27 +0000 |
| commit | 9a091cb2ff2b83f45aefdcf754dce14c9bc284e2 (patch) | |
| tree | df2297622df75aa22c2e198476145d20ac3dbdc4 | |
| parent | 01ab47968c0b620f8012c0d2dc969f5788c0d581 (diff) | |
Add robots.txt to prevent scraping of full Geminispace
| -rwxr-xr-x | build.py | 4 | ||||
| -rw-r--r-- | static/gmi/robots.txt | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -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() diff --git a/static/gmi/robots.txt b/static/gmi/robots.txt new file mode 100644 index 00000000..da2aac59 --- /dev/null +++ b/static/gmi/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /x/ |
