4 ms·
No, it definitely doesn't do that. I use the `limit_posts` option when I'm writing a single blog post, and then have a "rake deploy" task that re-generates the
by spatten 12y ago
No, it definitely doesn't do that. I use the `limit_posts` option when I'm writing a single blog post, and then have a "rake deploy" task that re-generates the site fully (without the `limit_posts` option) before rsyncing it up to the server.
I guess I should put the full Rakefile up on that post. Here are the relevant parts:
desc "generate and deploy"
task :deploy => ['jekyll:generate', 'deploy:deploy']
namespace :deploy do
task :deploy do
`rsync -r _site/ #{USER}@#{HOST}:#{DEPLOY_DIR}/`
end
end
namespace :jekyll do
desc "start the jekyll server in auto mode"
task :server, :num_posts do |t, args|
num_posts = args[:num_posts]
cmd = "jekyll --auto --server --pygments"
cmd += " --limit_posts #{num_posts}" if num_posts
puts "running #{cmd}"
exec(cmd)
end
desc "generate the site one time"
task :generate => :clean do
`jekyll --no-auto --pygments`
end
desc "remove the generated site"
task :clean do
`rm -rf _site`
end
end
- jacquesm 12y agoPity! Still, thanks for the tip (I can see one usecase for which it is handy, proofreading).