lib/octopress-ink.rb in octopress-ink-1.0.0.alpha.40 vs lib/octopress-ink.rb in octopress-ink-1.0.0.alpha.41
- old
+ new
@@ -43,11 +43,11 @@
Configuration.config
end
def self.site(options={})
log_level = Jekyll.logger.log_level
- Jekyll.logger.log_level = Jekyll::Stevenson::WARN
+ Jekyll.logger.log_level = Jekyll::Stevenson::ERROR
@site ||= Jekyll::Site.new(Jekyll.configuration(options))
Jekyll.logger.log_level = log_level
@site
end
@@ -132,10 +132,14 @@
else
puts "You have no plugins installed."
end
end
+ def self.gem_dir(*subdirs)
+ File.expand_path(File.join(File.dirname(__FILE__), '../..', *subdirs))
+ end
+
def self.copy_doc(source, dest)
contents = File.open(source).read
contents.sub!(/^# (.*)$/, "#{doc_title('\1').strip}")
FileUtils.mkdir_p File.dirname(dest)
File.open(dest, 'w') {|f| f.write(contents) }
@@ -166,9 +170,10 @@
Liquid::Template.register_tag('content_for', Octopress::Ink::Tags::ContentForTag)
Liquid::Template.register_tag('yield', Octopress::Ink::Tags::YieldTag)
Liquid::Template.register_tag('wrap', Octopress::Ink::Tags::WrapTag)
Liquid::Template.register_tag('abort', Octopress::Ink::Tags::AbortTag)
Liquid::Template.register_tag('_', Octopress::Ink::Tags::LineCommentTag)
+Liquid::Template.register_tag('doc_url', Octopress::Ink::Tags::DocUrlTag)
require 'octopress-ink/plugins/ink'
require 'octopress-ink/plugins/asset_pipeline'
Octopress::Ink.register_plugin(Ink)