The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Speeding up Jekyll Generation

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Patten

Posts: 43
Nickname: spatten
Registered: Jan, 2008

Scott Patten is a freelance web developer and Ruby on Rails trainer based in Vancouver
Speeding up Jekyll Generation Posted: Nov 18, 2011 11:20 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Scott Patten.
Original Post: Speeding up Jekyll Generation
Feed Title: Scott Patten's Blog
Feed URL: http://feeds.feedburner.com/scottpatten.ca
Feed Description: Scott Patten is the cofounder of Ruboss (http://ruboss.com) and Leanpub (http://leanpub.com), both based in Vancouver. He is also the author of The S3 Cookbook (http://leanpub.com/thes3cookbook). He blogs about Startups, Ruby, Rails, Javascript, CSS, Amazon Web Services and whatever else strikes his fancy.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Scott Patten
Latest Posts From Scott Patten's Blog

Advertisement

One of the only complaints you’ll see out there about Jekyll is that when sites get bigger, it starts to slow down.

Luckily, this is easy to fix. Unfortunately, it’s apparently not obvious as you still see people complaining about it. Here’s my attempt at proselytizing for Jekyll :).

If you run jekyll --help, you’ll see that there’s a --limit_posts option. If you set this to 1, then you’ll only re-generate your most recent post when you save. This is usually exactly what you want. If you’re working on a slightly older post, then bump it up to 3 or 4.

Like this:

 jekyll --limit_posts 1

I’ve put this in a rake task

    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

    end

So I can start Jekyll like this:

rake jekyll:server[1]

and only see the current post, and it’s blazing fast.

Read: Speeding up Jekyll Generation

Topic: Speeding up Jekyll Generation Previous Topic   Next Topic Topic: Multiple Google Analytics Tracking Codes on one Page

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use