Sha256: 045f5d521207656317630c0364ff826b4cd14e53e45359148edfda5d12508a33

Contents?: true

Size: 504 Bytes

Versions: 2

Compression:

Stored size: 504 Bytes

Contents

module Stevenson
  module OutputFilters
    module JekyllFilter
      def output(directory)
        # Jekyll Build the Directory
        Dir.chdir(path) do
          `jekyll b`
        end

        # Replace the repository with the compiled directory
        Dir.mktmpdir do |dir|
          FileUtils.cp_r File.join(path, '_site', '.'), dir
          FileUtils.rm_r path
          FileUtils.cp_r dir, path
        end

        # Call the parent method
        super directory
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stevenson-1.0.1 lib/stevenson/output_filters/jekyll.rb
stevenson-1.0.0 lib/stevenson/output_filters/jekyll.rb