diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html
index c3157ea8..c7a0a79b 100644
--- a/docs/_includes/footer.html
+++ b/docs/_includes/footer.html
@@ -23,7 +23,7 @@
-{% if site.github %}
+{% if site.data.minified %}
{% else %}
diff --git a/docs/_includes/header.html b/docs/_includes/header.html
index 3a569992..f1cbd52e 100644
--- a/docs/_includes/header.html
+++ b/docs/_includes/header.html
@@ -18,7 +18,7 @@
-{% if site.github %}
+{% if site.data.minified %}
{% else %}
diff --git a/docs/_plugins/variables.rb b/docs/_plugins/variables.rb
index be0d66f4..83371a81 100644
--- a/docs/_plugins/variables.rb
+++ b/docs/_plugins/variables.rb
@@ -6,6 +6,15 @@ module Variables
safe true
def generate(site)
+
+ # indicate to use min or development assets
+ baseurl = site.config['baseurl']
+ minified = true
+ if baseurl.eql? ''
+ minified = false
+ end
+ site.data['minified'] = minified
+
metadata_files = {
'bower' => '../bower.json',
'package' => '../package.json',
@@ -30,20 +39,23 @@ module Variables
# fabricate the archive and release links based on the site.repo and version
- jekyll_config = Jekyll.configuration({})
- repo = jekyll_config['repo']
+ repo = site.config['repo']
site.data['download'] = {
'source' => "#{repo}/archive/v#{version}.zip",
'dist' => "#{repo}/releases/download/v#{version}/#{name}-#{version}-dist.zip"
}
site.data['cdn'] = {
- 'jquery' => jekyll_config['cdn']['jquery'].gsub(/VERSION/, jquery_version),
- 'bootstrap' => jekyll_config['cdn']['bootstrap'].gsub(/VERSION/, bootstrap_version)
+ 'jquery' => site.config['cdn']['jquery'].gsub(/VERSION/, jquery_version),
+ 'bootstrap' => site.config['cdn']['bootstrap'].gsub(/VERSION/, bootstrap_version)
}
#
- # puts "\n---------------------"
+ puts "\n---------------------"
+ puts "site.config: #{site.config.to_yaml}"
+ puts "baseurl: #{baseurl}"
+ puts "minified: #{site.data['minified']}"
+ # puts "site: #{site.to_yaml}"
# puts site.data[:package]['version']
# puts site.data.to_yaml
# puts repo