aboutsummaryrefslogtreecommitdiffstats
path: root/templates/robots.txt
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-07-10 14:53:59 +0100
committerGravatar Gareth Coles <[email protected]>2018-07-10 14:53:59 +0100
commit28b72409b43cb401f5bef03747e888e1cf27262a (patch)
tree4fa4998816fe6ff4bf80db281dc12b3d68323490 /templates/robots.txt
parentMerge branch 'fix-numbers-in-channel-names' into 'master' (diff)
All domains: sitemap.xml and robots.txt
Diffstat (limited to 'templates/robots.txt')
-rw-r--r--templates/robots.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/robots.txt b/templates/robots.txt
new file mode 100644
index 00000000..be2a512c
--- /dev/null
+++ b/templates/robots.txt
@@ -0,0 +1,14 @@
+{# robots.txt is a little picky about whitespace and newlines - that's why the below looks kind of bad.#}
+{% if rules is defined and rules %}
+{% for user_agent, disallowed in rules %}
+User-agent: {{ user_agent }}
+{% for rule in rules %}
+Disallow: {{ rule }}
+{% endfor %}
+{% endfor %}
+{% else %}
+User-agent: *
+Disallow:
+{% endif %}
+
+Sitemap: {{ sitemap_url }}