0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

Disallow crawling on Netlify. (#29194)

This commit is contained in:
XhmikosR 2019-08-03 17:09:25 +03:00 committed by GitHub
parent 8c3a1298f7
commit c93fdec2f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 6 deletions

View File

@ -69,6 +69,7 @@
"docs": "npm-run-all css-docs js-docs docs-compile docs-lint", "docs": "npm-run-all css-docs js-docs docs-compile docs-lint",
"docs-compile": "bundle exec jekyll build", "docs-compile": "bundle exec jekyll build",
"docs-production": "cross-env JEKYLL_ENV=production npm run docs-compile", "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-lint": "node build/vnu-jar.js",
"docs-serve": "bundle exec jekyll serve", "docs-serve": "bundle exec jekyll serve",
"docs-serve-only": "npm run docs-serve -- --skip-initial-build --no-watch", "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\"", "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", "dist": "npm-run-all --parallel css js",
"test": "npm-run-all lint dist js-test docs-compile docs-lint bundlesize", "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": "npm-run-all --parallel watch-*",
"watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm run css-main\"", "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\"", "watch-css-docs": "nodemon --watch \"site/docs/**/assets/scss/\" --ext scss --exec \"npm run css-docs\"",

View File

@ -1,7 +1,7 @@
<script src="{{ site.cdn.jquery }}" integrity="{{ site.cdn.jquery_hash }}" crossorigin="anonymous"></script> <script src="{{ site.cdn.jquery }}" integrity="{{ site.cdn.jquery_hash }}" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/jquery.slim.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/jquery.slim.min.js"><\/script>')</script>
{%- if jekyll.environment == "production" -%} {%- if jekyll.environment == "production" or jekyll.environment == "netlify" -%}
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ site.cdn.js_bundle_hash }}" crossorigin="anonymous"></script> <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ site.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
{%- else -%} {%- else -%}
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.js"></script> <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.js"></script>
@ -11,7 +11,7 @@
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
{%- endif -%} {%- endif -%}
{%- if jekyll.environment == "production" -%} {%- if jekyll.environment == "production" or jekyll.environment == "netlify" -%}
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/docs.min.js"></script> <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/docs.min.js"></script>
{%- else -%} {%- else -%}
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/anchor.min.js"></script> <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/anchor.min.js"></script>

View File

@ -1,5 +1,5 @@
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
{%- if jekyll.environment == "production" %} {%- if jekyll.environment == "production" or jekyll.environment == "netlify" %}
<link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/css/bootstrap.min.css" rel="stylesheet" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous"> <link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/css/bootstrap.min.css" rel="stylesheet" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous">
{% else %} {% else %}
<link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/css/bootstrap.css" rel="stylesheet"> <link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/css/bootstrap.css" rel="stylesheet">

View File

@ -42,7 +42,7 @@
<script src="{{ site.cdn.jquery }}" integrity="{{ site.cdn.jquery_hash }}" crossorigin="anonymous"></script> <script src="{{ site.cdn.jquery }}" integrity="{{ site.cdn.jquery_hash }}" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/jquery.slim.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/jquery.slim.min.js"><\/script>')</script>
{%- if jekyll.environment == "production" -%} {%- if jekyll.environment == "production" or jekyll.environment == "netlify" -%}
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ site.cdn.js_bundle_hash }}" crossorigin="anonymous"></script> <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ site.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
{%- else -%} {%- else -%}
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.js"></script> <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.js"></script>

View File

@ -3,7 +3,9 @@
# www.robotstxt.org/ # www.robotstxt.org/
{% if jekyll.environment != "netlify" -%}
# Allow crawling of all content # Allow crawling of all content
{%- endif %}
User-agent: * User-agent: *
Disallow:{% if jekyll.environment != "production" %} /{% endif %} Disallow:{% if jekyll.environment == "netlify" %} /{% endif %}
Sitemap: {{ site.url }}/sitemap.xml Sitemap: {{ site.url }}/sitemap.xml