Solves #843. Fix dynamically derived asset urls etc

This commit is contained in:
Kevin Ross 2016-01-26 11:21:39 -06:00
parent 6e869f24b3
commit e24f1ccc9a
3 changed files with 16 additions and 9 deletions

View File

@ -49,7 +49,7 @@ cdn:
# # See https://www.srihash.org for info on how to generate the hashes
css: https://cdn.rawgit.com/fezvrasta/bootstrap-material-design/v4-dev/dist/css/bootstrap-material-design.css
# css_hash: "sha384-XXXXXXXX"
js: https://cdn.rawgit.com/fezvrasta/bootstrap-material-design/v4-dev/dist/js/bootstrap-material-design.js
js: https://cdn.rawgit.com/fezvrasta/bootstrap-material-design/v4-dev/dist/js/bootstrap-material-design
# js_hash: "sha384-XXXXXXXX"
# fonts

View File

@ -39,7 +39,13 @@ module Variables
bootstrap_version = site.data['npm_bootstrap']['version']
assert_not_nil :bootstrap_version, bootstrap_version
if (bootstrap_version.include?('rosskevin'))
if (bootstrap_version.include?('rosskevin') || bootstrap_version.include?('alpha'))
# // not this
# https://cdn.rawgit.com/twbs/bootstrap/4.0.0-alpha.2/dist/js/bootstrap.js
# // this
# https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/js/bootstrap.js
bootstrap_version = 'v4-dev' # hack since we are using a rosskevin flex branch
end

View File

@ -35,9 +35,10 @@ Copy-paste the font and stylesheet `<link>` into your `<head>` before all other
Add jQuery, Bootstrap, and our Javascript plugins near the end of your pages, right before the closing `</body>` tag. Be sure to place jQuery first as our code depends on it.
{% highlight html %}
<script src="{{ site.data.cdn.jquery }}"></script>
<script src="{{ site.data.cdn.bootstrap }}"></script>
<script src="{{ site.cdn.js }}"></script>
<script src="{{ site.data.cdn.jquery }}.min.js"></script>
<script src="{{ site.data.cdn.tether }}.min.js"></script>
<script src="{{ site.data.cdn.bootstrap }}.min.js"></script>
<script src="{{ site.cdn.js }}.iife.min.js"></script>
<script>
$('body').bootstrapMaterialDesign()
</script>
@ -75,10 +76,10 @@ Put it all together and your pages should look like this:
<h1>Hello, world!</h1>
<!-- jQuery first, optional tether for tooltips, then Bootstrap and Material Design for Bootstrap JS. -->
<script src="{{ site.data.cdn.jquery }}"></script>
<script src="{{ site.data.cdn.tether }}"></script>
<script src="{{ site.data.cdn.bootstrap }}"></script>
<script src="{{ site.cdn.js }}"></script>
<script src="{{ site.data.cdn.jquery }}.min.js"></script>
<script src="{{ site.data.cdn.tether }}.min.js"></script>
<script src="{{ site.data.cdn.bootstrap }}.min.js"></script>
<script src="{{ site.cdn.js }}.iife.min.js"></script>
<script>
$('body').bootstrapMaterialDesign()
</script>