class Octodmin::Site
Constants
- DEFAULT_CONFIG
Attributes
site[RW]
Public Class Methods
new()
click to toggle source
# File lib/octodmin/site.rb, line 25 def initialize @site = Jekyll::Site.new(Jekyll.configuration) end
Public Instance Methods
config()
click to toggle source
# File lib/octodmin/site.rb, line 33 def config @config ||= Jekyll::Utils.deep_merge_hashes(DEFAULT_CONFIG, @site.config) end
posts()
click to toggle source
# File lib/octodmin/site.rb, line 41 def posts reset @site.read @site.posts.sort_by(&:date).last(20).reverse.map { |post| Post.new(self, post) } end
process()
click to toggle source
# File lib/octodmin/site.rb, line 57 def process @site.process end
reset()
click to toggle source
# File lib/octodmin/site.rb, line 47 def reset @status = nil @site.reset self end
serializable_hash()
click to toggle source
# File lib/octodmin/site.rb, line 37 def serializable_hash config end
source()
click to toggle source
# File lib/octodmin/site.rb, line 29 def source @site.source end
status()
click to toggle source
# File lib/octodmin/site.rb, line 53 def status @status ||= Git.open(Octodmin::App.dir).status end