]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
download: Reword CDN paragraph (#39179)
authorXhmikosR <xhmikosr@gmail.com>
Thu, 14 Sep 2023 14:02:13 +0000 (17:02 +0300)
committerGitHub <noreply@github.com>
Thu, 14 Sep 2023 14:02:13 +0000 (17:02 +0300)
.cspell.json
site/content/docs/5.3/getting-started/download.md

index e477ef83d3936ee6449c8eef87d0f8c44d80b55d..484af2af58d73f4fe1c1782753e54d92df0dbf02 100644 (file)
@@ -40,6 +40,7 @@
     "dropright",
     "dropstart",
     "dropup",
+    "dgst",
     "errorf",
     "favicon",
     "favicons",
index 9c20c6bb2296d61959077da51ceba5cc4b4477c0..f813e48de5b52ad3a5fd8ae672a323bb37102e8e 100644 (file)
@@ -54,9 +54,19 @@ If you're using our compiled JavaScript and prefer to include Popper separately,
 
 We recommend [jsDelivr](https://www.jsdelivr.com/) and use it ourselves in our documentation. However, in some cases—like in some specific countries or environments—you may need to use other CDN providers like [cdnjs](https://cdnjs.com/) or [unpkg](https://unpkg.com/).
 
-You'll find the same files on these CDN providers, albeit with different URLs. When changing the URLs, you'll also need to update the `integrity` attribute. Tools like [SRI Hash Generator](https://www.srihash.org/) can help you generate the correct values.
+You'll find the same files on these CDN providers, albeit with different URLs. With cdnjs, you can [use this direct Bootstrap package link](https://cdnjs.com/libraries/bootstrap) to copy and paste ready-to-use HTML snippets for each dist file from any version of Bootstrap.
 
-With cdnjs, you can [use this direct Bootstrap package link](https://cdnjs.com/libraries/bootstrap) to copy and paste ready-to-use HTML snippets for each dist file from any version of Bootstrap.
+{{< callout warning>}}
+**If the SRI hashes differ for a given file, you shouldn't use the files from that CDN, because it means that the file was modified by someone else.**
+{{< /callout >}}
+
+Note that you should compare same length hashes, e.g. `sha384` with `sha384`, otherwise it's expected for them to be different.
+As such, you can use an online tool like [SRI Hash Generator](https://www.srihash.org/) to make sure that the hashes are the same for a given file.
+Alternatively, assuming you have OpenSSL installed, you can achieve the same from the CLI, for example:
+
+```sh
+openssl dgst -sha384 -binary bootstrap.min.js | openssl base64 -A
+```
 
 ## Package managers