Module: Stastic::Generator::Jekyll

Extended by:
Jekyll
Included in:
Jekyll
Defined in:
lib/stastic/generators/jekyll.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



18
19
20
21
# File 'lib/stastic/generators/jekyll.rb', line 18

def build
  verify_gem
  system("jekyll")
end

#descObject



5
6
7
# File 'lib/stastic/generators/jekyll.rb', line 5

def desc
  "Jekyll Generator"
end

#detectObject



9
10
11
12
# File 'lib/stastic/generators/jekyll.rb', line 9

def detect
  FileTest.exists?('_config.yml') ||
  (FileTest.exists?('_site') && File.directory?('_site'))
end

#packageObject



23
24
25
# File 'lib/stastic/generators/jekyll.rb', line 23

def package
  Stastic::Generator.package(site_root)
end

#previewObject



27
28
29
30
# File 'lib/stastic/generators/jekyll.rb', line 27

def preview
  verify_gem
  system("jekyll --server")
end

#site_rootObject



14
15
16
# File 'lib/stastic/generators/jekyll.rb', line 14

def site_root
  Stastic::Config.site_root || "_site"
end