Sha256: 0726b0f733940b30241ea3790ee1d55fd57f88809c7ee16a0a65599bcb3cf8cb
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
require 'jekyll-contentfyll/importer' module Jekyll # Module for Jekyll Commands module Commands # jekyll contentful Command class Fyll < Command def self.init_with_program(prog) prog.command(:contentful) do |c| c.syntax 'contentful [OPTIONS]' c.description 'Imports data from Contentful' options.each { |opt| c.option(*opt) } add_build_options(c) command_action(c) end end def self.options [ [ 'rebuild', '-r', '--rebuild', 'Rebuild Jekyll Site after fetching data' ] ] end def self.command_action(command) command.action do |args, options| jekyll_options = configuration_from_options(options) process args, options, jekyll_options end end def self.process(_args = [], options = {}, config = {}) Jekyll.logger.info '...Fylling...' # Jekyll::Contentful::Importer.new(config).run # Jekyll.logger.info 'Contentful import finished' # return unless options['rebuild'] # Jekyll.logger.info 'Starting Jekyll Rebuild' # Jekyll::Commands::Build.process(options) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jekyll-contentfyll-0.0.2 | lib/jekyll/commands/fyll.rb |