lib/octopress-docs/command.rb in octopress-docs-0.0.8 vs lib/octopress-docs/command.rb in octopress-docs-0.0.9
- old
+ new
@@ -18,10 +18,11 @@
end
end
end
def self.serve_docs(options)
+ Octopress::Docs.docs_mode = true
if options['jekyll']
options = init_jekyll_docs(options)
else
options = init_octopress_docs(options)
end
@@ -58,11 +59,11 @@
def self.site_dir
Docs.gem_dir('docs')
end
def self.require_plugins
- config = Octopress.site.config
+ config = Octopress::Configuration.jekyll_config
if config['gems'].is_a?(Array)
config['gems'].each {|g| require g }
end
@@ -76,13 +77,15 @@
end
# Returns an Array of plugin search paths
def self.plugins_path
- if (Octopress.site.config['plugins'] == Jekyll::Configuration::DEFAULTS['plugins'])
- [Jekyll.sanitized_path(Octopress.site.source, Octopress.site.config['plugins'])]
+ config = Octopress::Configuration.jekyll_config
+ plugins = config['plugins']
+ if (plugins == Jekyll::Configuration::DEFAULTS['plugins'])
+ [Jekyll.sanitized_path(config['source'], plugins)]
else
- Array(Octopress.site.config['plugins']).map { |d| File.expand_path(d) }
+ Array(plugins).map { |d| File.expand_path(d) }
end
end
end
end