aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--README.md14
-rw-r--r--_config.yml5
-rw-r--r--_config_dev.yml1
-rw-r--r--_includes/bootstrap_css.html5
-rw-r--r--_includes/bootstrap_js.html5
-rw-r--r--_includes/footer.html4
-rw-r--r--_includes/header.html8
-rw-r--r--_includes/ie_compat.html11
-rw-r--r--_includes/jquery.html5
9 files changed, 50 insertions, 8 deletions
diff --git a/README.md b/README.md
index 45168bd..274c4af 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,20 @@ One possible workaround is to add `--force_polling` to `jekyll`s options:
It might still not work though, so you might end up having to re-run `jekyll` manually.
For details, refer to http://jekyll-windows.juthilo.com/4-wdm-gem/.
+To use properly formatted external CSS stylesheets and Javascript files instead of the `min`ified versions, override the `site.minified_externals` field by passing `--config _config.yml,_config_dev.yml` to `jekyll`.
+
+To sum up, on Linux use
+
+ bundle exec jekyll serve \
+ --watch \
+ --config _config.yml,_config_dev.yml
+
+and on Windows (hoping for the best) use
+
+ bundle exec jekyll serve ^
+ --watch --force_polling ^
+ --config _config.yml,_config_dev.yml
+
## Licensing
This project, including all of the files and their contents, is licensed under the terms of the MIT License.
diff --git a/_config.yml b/_config.yml
new file mode 100644
index 0000000..a487563
--- /dev/null
+++ b/_config.yml
@@ -0,0 +1,5 @@
+bootstrap_version: 3.2.0
+jquery_version: 1.11.0
+html5shiv_version: 3.7.2
+respond_version: 1.4.2
+minified_externals: true
diff --git a/_config_dev.yml b/_config_dev.yml
new file mode 100644
index 0000000..fd91893
--- /dev/null
+++ b/_config_dev.yml
@@ -0,0 +1 @@
+minified_externals: false
diff --git a/_includes/bootstrap_css.html b/_includes/bootstrap_css.html
new file mode 100644
index 0000000..f47b856
--- /dev/null
+++ b/_includes/bootstrap_css.html
@@ -0,0 +1,5 @@
+{% if site.minified_externals %}
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/css/bootstrap.min.css">
+{% else %}
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/css/bootstrap.css">
+{% endif %}
diff --git a/_includes/bootstrap_js.html b/_includes/bootstrap_js.html
new file mode 100644
index 0000000..e724257
--- /dev/null
+++ b/_includes/bootstrap_js.html
@@ -0,0 +1,5 @@
+{% if site.minified_externals %}
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/js/bootstrap.min.js"></script>
+{% else %}
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/js/bootstrap.js"></script>
+{% endif %}
diff --git a/_includes/footer.html b/_includes/footer.html
index 9fac10a..1312fc8 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -19,7 +19,7 @@
</footer>
</div>
</div>
- <script src="https://code.jquery.com/jquery-1.11.0.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.js"></script>
+ {% include jquery.html %}
+ {% include bootstrap_js.html %}
</body>
</html>
diff --git a/_includes/header.html b/_includes/header.html
index 1a14fb2..49ad713 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -7,16 +7,12 @@
<title>{{ page.title }}</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.css">
+ {% include bootstrap_css.html %}
<link rel="stylesheet" href="/css/footer.css">
<link rel="stylesheet" href="/css/misc.css">
- <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.js"></script>
- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.js"></script>
- <![endif]-->
+ {% include ie_compat.html %}
</head>
<body>
<div class="top-level-footer-wrapper">
diff --git a/_includes/ie_compat.html b/_includes/ie_compat.html
new file mode 100644
index 0000000..3cef67d
--- /dev/null
+++ b/_includes/ie_compat.html
@@ -0,0 +1,11 @@
+{% if site.minified_externals %}
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/html5shiv/{{ site.html5shiv_version }}/html5shiv.min.js"></script>
+ <script src="https://oss.maxcdn.com/respond/{{ site.respond_version }}/respond.min.js"></script>
+ <![endif]-->
+{% else %}
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/html5shiv/{{ site.html5shiv_version }}/html5shiv.js"></script>
+ <script src="https://oss.maxcdn.com/respond/{{ site.respond_version }}/respond.js"></script>
+ <![endif]-->
+{% endif %}
diff --git a/_includes/jquery.html b/_includes/jquery.html
new file mode 100644
index 0000000..aa6d2fd
--- /dev/null
+++ b/_includes/jquery.html
@@ -0,0 +1,5 @@
+{% if site.minified_externals %}
+ <script src="https://code.jquery.com/jquery-{{ site.jquery_version }}.min.js"></script>
+{% else %}
+ <script src="https://code.jquery.com/jquery-{{ site.jquery_version }}.js"></script>
+{% endif %}