...
|
...
|
@@ -20,6 +20,7 @@ posts_dir = "_posts" # directory for blog files
|
20
|
20
|
themes_dir = ".themes" # directory for blog files
|
21
|
21
|
new_post_ext = "markdown" # default new post file extension when using the new_post task
|
22
|
22
|
new_page_ext = "markdown" # default new page file extension when using the new_page task
|
|
23
|
+server_port = "4000" # port for preview server eg. localhost:4000
|
23
|
24
|
|
24
|
25
|
|
25
|
26
|
desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
|
...
|
...
|
@@ -52,7 +53,7 @@ end
|
52
|
52
|
|
53
|
53
|
desc "preview the site in a web browser"
|
54
|
54
|
task :preview do
|
55
|
|
- system "trap 'kill $jekyllPid $compassPid' Exit; jekyll --auto --server & jekyllPid=$!; compass watch & compassPid=$!; wait"
|
|
55
|
+ system "trap 'kill $jekyllPid $compassPid $rackPid' Exit; jekyll --auto & jekyllPid=$!; compass watch & compassPid=$!; rackup --port #{server_port} & rackPid=$!; wait"
|
56
|
56
|
end
|
57
|
57
|
|
58
|
58
|
# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post")
|