diff --git a/plugins/cache_buster.rb b/plugins/cache_buster.rb new file mode 100644 index 00000000000..895b39a2eeb --- /dev/null +++ b/plugins/cache_buster.rb @@ -0,0 +1,10 @@ +module Jekyll + module CacheBuster + require 'digest/md5' + def cache_buster(file_name) + [file_name, '?', Digest::MD5.hexdigest(File.read(File.join('./source', file_name)))].join + end + end +end + +Liquid::Template.register_filter(Jekyll::CacheBuster) diff --git a/source/_includes/javascripts/scripts.html b/source/_includes/javascripts/scripts.html index 4330401c789..79868bc88da 100644 --- a/source/_includes/javascripts/scripts.html +++ b/source/_includes/javascripts/scripts.html @@ -5,7 +5,7 @@ g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js s.parentNode.insertBefore(g,s)}(document,'script')); - + diff --git a/source/_includes/site/head.html b/source/_includes/site/head.html index 35b140ccf88..b965a92e387 100644 --- a/source/_includes/site/head.html +++ b/source/_includes/site/head.html @@ -28,8 +28,8 @@ - - + +