docs: fix bundle SRI hash.

Also, remove popper.js from this script since it's not present in the repo.
This commit is contained in:
XhmikosR 2018-09-28 18:09:49 +03:00
parent 339311ddb5
commit 449979decf
3 changed files with 5 additions and 3 deletions

View File

@ -53,6 +53,8 @@ cdn:
css_hash: "sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
js: "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
js_hash: "sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
jquery: "https://code.jquery.com/jquery-3.3.1.slim.min.js"
jquery_hash: "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"

View File

@ -36,8 +36,8 @@ const files = [
configPropertyName: 'jquery_hash'
},
{
file: 'site/docs/4.1/assets/js/vendor/popper.min.js',
configPropertyName: 'popper_hash'
file: 'dist/js/bootstrap.bundle.min.js',
configPropertyName: 'js_bundle_hash'
}
]

View File

@ -2,7 +2,7 @@
<script>window.jQuery || document.write('<script src="{{ site.baseurl }}/assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
{%- if site.github -%}
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ site.cdn.js_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 -%}
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.js"></script>
{%- endif -%}