Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created March 24, 2011 18:00
Show Gist options
  • Save ashaw/885533 to your computer and use it in GitHub Desktop.
Save ashaw/885533 to your computer and use it in GitHub Desktop.
desc "build docs"
task :docs do
require 'rdiscount'
require 'erb'
license = File.open('LICENSE.txt','r').read
mdown = RDiscount.new(ERB.new(File.open('doc/doc.markdown','r').read).result(binding), :smart).to_html
wrapper = File.open('doc/doc_wrapper.erb','r').read
mdown = File.open('index.html','w+') do |f|
f.write ERB.new(wrapper).result(binding)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment