Class: JekyllDocs::DocsCommand
- Inherits:
-
Jekyll::Command
- Object
- Jekyll::Command
- JekyllDocs::DocsCommand
- Defined in:
- lib/jekyll-docs.rb
Class Method Summary collapse
Class Method Details
.init_with_program(prog) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/jekyll-docs.rb', line 6 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 |
.process(opts) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/jekyll-docs.rb', line 20 def process(opts) = opts.merge({ "serving" => true, "watch" => false, "destination" => File.("../../site", __FILE__), "skip_initial_build" => true }) Jekyll::Commands::Serve.process() end |