Created
October 2, 2011 20:50
-
-
Save CarterA/1257930 to your computer and use it in GitHub Desktop.
About This Website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
border-radius: 5px; | |
-moz-border-radius: 5px; | |
-webkit-border-radius: 5px; | |
behavior: url(/stylesheets/PIE.htc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box-shadow: inset 0 0 8px black; | |
-moz-box-shadow: inset 0 0 8px black; | |
-webkit-box-shadow: inset 0 0 8px black; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :default => :server | |
desc 'Build site with Jekyll.' | |
task :build do | |
jekyll | |
end | |
desc 'Start server with --auto.' | |
task :server do | |
jekyll('--server --auto') | |
end | |
desc 'Remove all built files.' | |
task :clean do | |
sh 'rm -rf _site' | |
end | |
def jekyll(opts = '') | |
Rake::Task['clean'].execute | |
sh 'jekyll ' + opts | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Build, deploy, then clean.' | |
task :deploy => :build do | |
sh 'rsync -rtzh --progress _site/ [email protected]:~/cartera.me/' | |
Rake::Task['clean'].execute | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :new do | |
title = ask("# ") # | |
fileName = ask("Filename: ") | |
article = {"title" => title, "layout" => "post"}.to_yaml | |
article << "---" | |
path = "_posts/#{Time.now.strftime("%Y-%m-%d")}#{'-' + fileName}.md" | |
unless File.exist?(path) | |
File.open(path, "w") do |file| | |
file.write article | |
sh "mate " + path | |
end | |
puts "A new article was created at #{path}." | |
else | |
puts "There was an error creating the article, #{path} already exists." | |
end | |
end | |
def ask message | |
print message | |
STDIN.gets.chomp | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="/scripts/modernizr-1.5.min.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment