Class: Jekyll::Tasks

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/jekyll/tasks.rb

Overview

Rake tasks for generating a Jekyll site and running the server.

The attributes correspond to the command line options the jekyll command accepts.

An example Rakefile would look like:

require 'rake'
require 'jekyll/tasks'

Jekyll::Tasks.new do |jekyll|
  jekyll.rdiscount = true
  jekyll.pygments = true
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Tasks

Returns a new instance of Tasks.

Yields:

  • (_self)

Yield Parameters:

  • _self (Jekyll::Tasks)

    the object that the method was called on



21
22
23
24
25
26
27
28
# File 'lib/jekyll/tasks.rb', line 21

def initialize
  yield self if block_given?

  @source ||= '.'
  @destination ||= File.join('.', '_site')

  define_task
end

Instance Attribute Details

#destinationObject

Returns the value of attribute destination.



20
21
22
# File 'lib/jekyll/tasks.rb', line 20

def destination
  @destination
end

#lsiObject

Returns the value of attribute lsi.



20
21
22
# File 'lib/jekyll/tasks.rb', line 20

def lsi
  @lsi
end

Returns the value of attribute permalink.



20
21
22
# File 'lib/jekyll/tasks.rb', line 20

def permalink
  @permalink
end

#pygmentsObject

Returns the value of attribute pygments.



20
21
22
# File 'lib/jekyll/tasks.rb', line 20

def pygments
  @pygments
end

#rdiscountObject

Returns the value of attribute rdiscount.



20
21
22
# File 'lib/jekyll/tasks.rb', line 20

def rdiscount
  @rdiscount
end

#serverObject

Returns the value of attribute server.



20
21
22
# File 'lib/jekyll/tasks.rb', line 20

def server
  @server
end

#server_portObject

Returns the value of attribute server_port.



20
21
22
# File 'lib/jekyll/tasks.rb', line 20

def server_port
  @server_port
end

#sourceObject

Returns the value of attribute source.



20
21
22
# File 'lib/jekyll/tasks.rb', line 20

def source
  @source
end