Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 2841569d31
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (27 sloc) 0.571 kB
require 'rubygems'
require 'rake'
require 'date'
desc 'deploy site'
task :deploysite do
system ("cp -r _site/* . && rm -rf _site/ && touch .nojekyll")
end
desc 'create a new draft post'
task :post do
title = ENV['TITLE']
slug = "#{Date.today}-#{title.downcase.gsub(/[^\w]+/, '-')}"
file = File.join(
File.dirname(__FILE__),
'_posts',
slug + '.md'
)
File.open(file, "w") do |f|
f << <<-EOS.gsub(/^ /, '')
---
layout: post
title: #{title}
published: false
---
EOS
end
system ("#{ENV['EDITOR']} #{file}")
end
Jump to Line
Something went wrong with that request. Please try again.