module Jekyll
  module AssetsPlugin
    class Renderer

      STYLESHEET = '<link rel="stylesheet" type="text/css" href="%s">'
      JAVASCRIPT = '<script type="text/javascript" src="%s"></script>'


      def initialize context, logical_path
        @site = context.registers[:site]
        @path = logical_path.strip
      end


      def render_asset
        @site.assets[@path].to_s
      end


      def render_asset_path
        @site.asset_path @path
      end


      def render_javascript
        @path << ".js" if File.extname(@path).empty?

        JAVASCRIPT % render_asset_path
      end


      def render_stylesheet
        @path << ".css" if File.extname(@path).empty?

        STYLESHEET % render_asset_path
      end

    end
  end
end


module Jekyll
  module AssetsPlugin
    class Renderer

      STYLESHEET = '<link rel="stylesheet" href="%s">'
      JAVASCRIPT = '<script src="%s"></script>'


      def initialize context, logical_path
        @site = context.registers[:site]
        @path = logical_path.strip
      end


      def render_asset
        @site.assets[@path].to_s
      end


      def render_asset_path
        @site.asset_path @path
      end


      def render_javascript
        @path << ".js" if File.extname(@path).empty?

        JAVASCRIPT % render_asset_path
      end


      def render_stylesheet
        @path << ".css" if File.extname(@path).empty?

        STYLESHEET % render_asset_path
      end

    end
  end
end


Remove type attribute from default tag templates
Remove type attribute from default tag templates

`type` attribute for javascripts and stylesheets is neraly useless in HTML5:

  http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#attr-link-type
  http://www.w3.org/html/wg/drafts/html/master/scripting-1.html#the-script-element

Resolves #37