Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Commit

Permalink
Merge pull request #41 from ashfurrow/gh-pages
Browse files Browse the repository at this point in the history
@orta: Adds serve command to Rakefile
  • Loading branch information
orta committed Aug 4, 2015
2 parents e57110e + d0e6dfb commit 9f0f6c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -9,7 +9,7 @@ bundle install

Running it:
```
bundle exec jekyll serve
bundle exec rake serve
```

Making a new post:
Expand Down
13 changes: 13 additions & 0 deletions Rakefile
Expand Up @@ -9,6 +9,19 @@ posts_dir = "_posts/" # directory for blog files
new_post_ext = "md" # default new post file extension when using the new_post task
new_page_ext = "md" # default new page file extension when using the new_page task

# Running locally

desc 'Runs a local server and watches for changes'
task :serve do
puts 'Starting the server locally on http://localhost:4000'
server = Process.spawn("bundle exec jekyll serve --watch --drafts --port 4000")

trap("INT") {
Process.kill(0, server) rescue Errono::ESRCH
}

Process.wait(server)
end

#############################
# Create a new Post or Page #
Expand Down

0 comments on commit 9f0f6c0

Please sign in to comment.