From 23d26c55259b73656754fe3dab89af97d627ed5a Mon Sep 17 00:00:00 2001 From: Antonin Hildebrand Date: Sun, 21 Mar 2010 01:16:07 +0100 Subject: [PATCH] allow setting --url from commandline (issue #15, closes #143) Sometimes you may be forced to use absolute urls. For example I had problem with FeedBurner's blog post preview page. Image links specified as relative urls were not resolved correctly. I can imagine some poor RSS readers may behave similar way. I wanted site.url to be configurable, because I didn't want to hard-code final url there. I still want to be able to have working link when doing local web site development and testing. I have small bash script which runs jekyll -serve --auto with this parameter set for local development. My setup is more complicated, because I use several jekylls behind reverse proxy to simulate setup on http://binaryage.com which uses gh-pages from many repos together with layouts linked as git modules. --- bin/jekyll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/jekyll b/bin/jekyll index b33d4247..dddc95cb 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -78,6 +78,10 @@ opts = OptionParser.new do |opts| end end + opts.on("--url [URL]", "Set custom site.url") do |url| + options['url'] = url + end + opts.on("--version", "Display current version") do puts "Jekyll " + Jekyll::VERSION exit 0