Sha256: 08b3feac6c8f919338f600eafbbc0751a2a39e35142d3d9137db05c49bfb571a
Contents?: true
Size: 624 Bytes
Versions: 2
Compression:
Stored size: 624 Bytes
Contents
$:.unshift File.expand_path("../../../lib", File.dirname(__FILE__)) # For use/testing when no gem is installed require 'octopress' module Octopress class JavascriptAssetsTag < Liquid::Tag def initialize(tag_name, options, tokens) super end def render(context) js_assets = Octopress::JSAssetsManager.new url = js_assets.url if url url = context['site.root'].sub(/\/\s*$/, '') + url "<script src='#{url}' type='text/javascript'></script>" else '' end end end end Liquid::Template.register_tag('javascript_tag', Octopress::JavascriptAssetsTag)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
octopress-3.0.0.alpha2 | lib/octopress/tags/js-assets.rb |
octopress-3.0.0.alpha1 | lib/octopress/tags/js-assets.rb |