summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/create-file.lua5
-rw-r--r--soupault.conf9
2 files changed, 14 insertions, 0 deletions
diff --git a/plugins/create-file.lua b/plugins/create-file.lua
new file mode 100644
index 0000000..e1d0369
--- /dev/null
+++ b/plugins/create-file.lua
@@ -0,0 +1,5 @@
+file_name = config["name"]
+content = config["content"]
+
+file_path = Sys.join_path(build_dir, file_name)
+Sys.write_file(file_path, content)
diff --git a/soupault.conf b/soupault.conf
index 5d89d98..22e2351 100644
--- a/soupault.conf
+++ b/soupault.conf
@@ -50,6 +50,15 @@
action = "prepend_child"
profile = "staging"
+[widgets.disallow-indexing-on-staging]
+ widget = "create-file"
+ name = "robots.txt"
+ content = """
+User-agent: *
+Disallow: /
+"""
+ profile = "staging"
+
# Generates a list of available snapshots from S3
[widgets.list-snapshots]
widget = "exec"