diff --git a/package.json b/package.json index 6107e5eb54..fa9d201fdd 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "docs": "npm-run-all css-docs js-docs docs-compile docs-lint", "docs-compile": "bundle exec jekyll build", "docs-production": "cross-env JEKYLL_ENV=production npm run docs-compile", + "docs-netlify": "cross-env JEKYLL_ENV=netlify npm run docs-compile", "docs-lint": "node build/vnu-jar.js", "docs-serve": "bundle exec jekyll serve", "docs-serve-only": "npm run docs-serve -- --skip-initial-build --no-watch", @@ -79,7 +80,7 @@ "release-zip": "cross-env-shell \"shx rm -rf bootstrap-$npm_package_version-dist && shx cp -r dist/ bootstrap-$npm_package_version-dist && zip -r9 bootstrap-$npm_package_version-dist.zip bootstrap-$npm_package_version-dist && shx rm -rf bootstrap-$npm_package_version-dist\"", "dist": "npm-run-all --parallel css js", "test": "npm-run-all lint dist js-test docs-compile docs-lint bundlesize", - "netlify": "npm-run-all dist release-sri docs-production", + "netlify": "npm-run-all dist release-sri docs-netlify", "watch": "npm-run-all --parallel watch-*", "watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm run css-main\"", "watch-css-docs": "nodemon --watch \"site/docs/**/assets/scss/\" --ext scss --exec \"npm run css-docs\"", diff --git a/site/_includes/scripts.html b/site/_includes/scripts.html index 67319e19fa..2f90f1e5dc 100644 --- a/site/_includes/scripts.html +++ b/site/_includes/scripts.html @@ -1,7 +1,7 @@ -{%- if jekyll.environment == "production" -%} +{%- if jekyll.environment == "production" or jekyll.environment == "netlify" -%} {%- else -%} @@ -11,7 +11,7 @@ {%- endif -%} -{%- if jekyll.environment == "production" -%} +{%- if jekyll.environment == "production" or jekyll.environment == "netlify" -%} {%- else -%} diff --git a/site/_includes/stylesheet.html b/site/_includes/stylesheet.html index 3846f9fe1c..2f7599e13c 100644 --- a/site/_includes/stylesheet.html +++ b/site/_includes/stylesheet.html @@ -1,5 +1,5 @@ -{%- if jekyll.environment == "production" %} +{%- if jekyll.environment == "production" or jekyll.environment == "netlify" %} {% else %} diff --git a/site/_layouts/examples.html b/site/_layouts/examples.html index 6617e6bc5b..4ca4c56810 100644 --- a/site/_layouts/examples.html +++ b/site/_layouts/examples.html @@ -42,7 +42,7 @@ - {%- if jekyll.environment == "production" -%} + {%- if jekyll.environment == "production" or jekyll.environment == "netlify" -%} {%- else -%} diff --git a/site/robots.txt b/site/robots.txt index d3ac12c646..9097d50dad 100644 --- a/site/robots.txt +++ b/site/robots.txt @@ -3,7 +3,9 @@ # www.robotstxt.org/ +{% if jekyll.environment != "netlify" -%} # Allow crawling of all content +{%- endif %} User-agent: * -Disallow:{% if jekyll.environment != "production" %} /{% endif %} +Disallow:{% if jekyll.environment == "netlify" %} /{% endif %} Sitemap: {{ site.url }}/sitemap.xml