mirror of
https://github.com/jekyll/jekyll.git
synced 2026-02-18 10:31:37 -05:00
Use Launchy for cross platform site:preview. Thx @ixti.
This commit is contained in:
4
Rakefile
4
Rakefile
@@ -118,12 +118,14 @@ end
|
||||
namespace :site do
|
||||
desc "Generate and view the site locally"
|
||||
task :preview do
|
||||
require "launchy"
|
||||
|
||||
# Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and
|
||||
# then open it in a browser. Someday we can do better than this, I hope.
|
||||
Thread.new do
|
||||
sleep 4
|
||||
puts "Opening in browser..."
|
||||
sh "open http://localhost:4000"
|
||||
Launchy.open("http://localhost:4000")
|
||||
end
|
||||
|
||||
# Generate the site in server mode.
|
||||
|
||||
@@ -39,6 +39,7 @@ Gem::Specification.new do |s|
|
||||
s.add_development_dependency('RedCloth', "~> 4.2")
|
||||
s.add_development_dependency('rdiscount', "~> 1.6")
|
||||
s.add_development_dependency('redcarpet', "~> 2.1.1")
|
||||
s.add_development_dependency('launchy', "~> 2.1.2")
|
||||
|
||||
# = MANIFEST =
|
||||
s.files = %w[
|
||||
|
||||
Reference in New Issue
Block a user