Class: Jekyll::Tasks
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Jekyll::Tasks
- 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
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#lsi ⇒ Object
Returns the value of attribute lsi.
-
#permalink ⇒ Object
Returns the value of attribute permalink.
-
#pygments ⇒ Object
Returns the value of attribute pygments.
-
#rdiscount ⇒ Object
Returns the value of attribute rdiscount.
-
#server ⇒ Object
Returns the value of attribute server.
-
#server_port ⇒ Object
Returns the value of attribute server_port.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Tasks
constructor
A new instance of Tasks.
Constructor Details
#initialize {|_self| ... } ⇒ Tasks
Returns a new instance of Tasks.
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
#destination ⇒ Object
Returns the value of attribute destination.
20 21 22 |
# File 'lib/jekyll/tasks.rb', line 20 def destination @destination end |
#lsi ⇒ Object
Returns the value of attribute lsi.
20 21 22 |
# File 'lib/jekyll/tasks.rb', line 20 def lsi @lsi end |
#permalink ⇒ Object
Returns the value of attribute permalink.
20 21 22 |
# File 'lib/jekyll/tasks.rb', line 20 def permalink @permalink end |
#pygments ⇒ Object
Returns the value of attribute pygments.
20 21 22 |
# File 'lib/jekyll/tasks.rb', line 20 def pygments @pygments end |
#rdiscount ⇒ Object
Returns the value of attribute rdiscount.
20 21 22 |
# File 'lib/jekyll/tasks.rb', line 20 def rdiscount @rdiscount end |
#server ⇒ Object
Returns the value of attribute server.
20 21 22 |
# File 'lib/jekyll/tasks.rb', line 20 def server @server end |
#server_port ⇒ Object
Returns the value of attribute server_port.
20 21 22 |
# File 'lib/jekyll/tasks.rb', line 20 def server_port @server_port end |
#source ⇒ Object
Returns the value of attribute source.
20 21 22 |
# File 'lib/jekyll/tasks.rb', line 20 def source @source end |