Sha256: 86c53ad58e4ec13110473a695e759d9b7f370dd6124e7e56e615edb8f713e4fc

Contents?: true

Size: 872 Bytes

Versions: 16

Compression:

Stored size: 872 Bytes

Contents

module Jekyll
  module Commands
    class Docs < Command

      class << self

        def init_with_program(prog)
          prog.command(:docs) do |c|
            c.syntax 'docs'
            c.description "Launch local server with docs for Jekyll v#{Jekyll::VERSION}"

            c.option 'port', '-P', '--port [PORT]', 'Port to listen on'
            c.option 'host', '-H', '--host [HOST]', 'Host to bind to'

            c.action do |args, options|
              options.merge!({
                'source'      => File.expand_path("../../../site", File.dirname(__FILE__)),
                'destination' => File.expand_path("../../../site/_site", File.dirname(__FILE__))
              })
              Jekyll::Commands::Build.process(options)
              Jekyll::Commands::Serve.process(options)
            end
          end
        end

      end

    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
jekyll-2.5.3 lib/jekyll/commands/docs.rb
jekyll-2.5.2 lib/jekyll/commands/docs.rb
jekyll-2.5.1 lib/jekyll/commands/docs.rb
jekyll-2.5.0 lib/jekyll/commands/docs.rb
jekyll-2.4.0 lib/jekyll/commands/docs.rb
jekyll-2.3.0 lib/jekyll/commands/docs.rb
jekyll-2.2.0 lib/jekyll/commands/docs.rb
jekyll-2.1.1 lib/jekyll/commands/docs.rb
jekyll-2.1.0 lib/jekyll/commands/docs.rb
jekyll-2.0.3 lib/jekyll/commands/docs.rb
jekyll-2.0.2 lib/jekyll/commands/docs.rb
jekyll-2.0.1 lib/jekyll/commands/docs.rb
jekyll-2.0.0 lib/jekyll/commands/docs.rb
jekyll-2.0.0.rc1 lib/jekyll/commands/docs.rb
jekyll-2.0.0.alpha.3 lib/jekyll/commands/docs.rb
jekyll-2.0.0.alpha.2 lib/jekyll/commands/docs.rb