]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Disable crawling on Netlify. (#29193) v3-dev
authorXhmikosR <xhmikosr@gmail.com>
Sat, 3 Aug 2019 14:09:03 +0000 (17:09 +0300)
committerGitHub <noreply@github.com>
Sat, 3 Aug 2019 14:09:03 +0000 (17:09 +0300)
Gruntfile.js
docs/robots.txt

index 39ba49ada366146e82a5494a97c3b66ea28c0111..43f923fb76443acaf899f5bba8af3dfb7063595e 100644 (file)
@@ -291,7 +291,7 @@ module.exports = function (grunt) {
       docs: {},
       netlify: {
         options: {
-          raw: 'github: true\nbaseurl: ""'
+          raw: 'github: true\nbaseurl: ""\nnetlify: true'
         }
       },
       github: {
index aef3fa1f64a16c82670d8036c1c926c5ebb9e16c..c68014eda10edbcfc8fc39316062b146ab4f2b4a 100644 (file)
@@ -3,7 +3,9 @@
 
 # www.robotstxt.org/
 
+{% if site.netlify != true and site.github == true -%}
 # Allow crawling of all content
+{%- endif %}
 User-agent: *
-Disallow:
+Disallow:{% if site.netlify == true or site.github != true %} /{% endif %}
 Sitemap: {{ site.url }}/sitemap.xml