Sha256: ef55c824e39b43d9b9f25a10ef144c6201d4e0342166c513be9c6f97a27fc8f8

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

require 'slim'
require 'jekyll-slim/version'
require 'jekyll-slim/tags/slim_partial'
require 'jekyll-slim/ext/layout'

module Jekyll
  class SlimConverter < Converter
    safe true
    priority :low

    def matches(ext)
      ext =~ /slim/i
    end

    def output_ext(ext)
      ".html"
    end

    def convert(content)
      begin
        ::Slim::Template.new { content }.render
      rescue StandardError => e
        puts "(!) SLIM ERROR: " + e.message
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-slim-0.8.2 lib/jekyll-slim.rb