Sha256: a6f9d4e2d0b681f7f7dfeb4c9b91cfb525868230d5e8fcf3c23ad7c78a13ad8b
Contents?: true
Size: 809 Bytes
Versions: 8
Compression:
Stored size: 809 Bytes
Contents
require 'jekyll' module JekyllDocs class DocsCommand < Jekyll::Command class << self def init_with_program(prog) prog.command(:docs) do |cmd| cmd.description "Start a local server for the Jekyll documentation" cmd.syntax "docs [options]" cmd.alias :d cmd.option "port", "-P", "--port", "Port to listen on." cmd.action do |_, opts| JekyllDocs::DocsCommand.process(opts) end end end def process(opts) options = opts.merge({ "serving" => true, "watch" => false, "destination" => File.expand_path("../../site", __FILE__), "skip_initial_build" => true }) Jekyll::Commands::Serve.process(options) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems