From 8a97cba2aafc0a582b73f5d766eee97278cab09f Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 19 May 2021 06:53:31 +0700 Subject: Disallow search engine indexing on staging. --- plugins/create-file.lua | 5 +++++ soupault.conf | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 plugins/create-file.lua 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" -- cgit v1.2.3