do not use DATA, rubygems freaks out
This commit is contained in:
parent
f5c727fadb
commit
8dff479a13
23
bin/jekyll
23
bin/jekyll
|
@ -2,13 +2,24 @@
|
||||||
|
|
||||||
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
||||||
|
|
||||||
|
help = <<HELP
|
||||||
|
Jekyll is a blog-aware, static site generator.
|
||||||
|
|
||||||
|
Basic Command Line Usage:
|
||||||
|
jekyll # . -> ./_site
|
||||||
|
jekyll <path to write generated site> # . -> <path>
|
||||||
|
jekyll <path to source> <path to write generated site> # <path> -> <path>
|
||||||
|
|
||||||
|
Options:
|
||||||
|
HELP
|
||||||
|
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
require 'jekyll'
|
require 'jekyll'
|
||||||
|
|
||||||
options = {}
|
options = {}
|
||||||
|
|
||||||
opts = OptionParser.new do |opts|
|
opts = OptionParser.new do |opts|
|
||||||
opts.banner = DATA.read
|
opts.banner = help
|
||||||
|
|
||||||
opts.on("--auto", "Auto-regenerate") do
|
opts.on("--auto", "Auto-regenerate") do
|
||||||
options[:auto] = true
|
options[:auto] = true
|
||||||
|
@ -68,13 +79,3 @@ if options[:auto]
|
||||||
else
|
else
|
||||||
Jekyll.process(source, destination)
|
Jekyll.process(source, destination)
|
||||||
end
|
end
|
||||||
|
|
||||||
__END__
|
|
||||||
Jekyll is a blog-aware, static site generator.
|
|
||||||
|
|
||||||
Basic Command Line Usage:
|
|
||||||
jekyll # . -> ./_site
|
|
||||||
jekyll <path to write generated site> # . -> <path>
|
|
||||||
jekyll <path to source> <path to write generated site> # <path> -> <path>
|
|
||||||
|
|
||||||
Options:
|
|
Loading…
Reference in New Issue