Skip to content

Commit

Permalink
Another massive commit:
Browse files Browse the repository at this point in the history
1. Major improvements to the responsive styling.
2. Toggleable sidebar
3. Upgraded to modernizr 2.0 which includes Respond.js
4. IE7-9 testing and fixes
5. New theming system which should make forkers happy
6. New rake task for installing Octopress themes
7. Magic
  • Loading branch information
imathis committed Jun 7, 2011
1 parent 8698a27 commit d8b796a
Show file tree
Hide file tree
Showing 68 changed files with 68 additions and 6,890 deletions.
10 changes: 5 additions & 5 deletions .gitignore
@@ -1,12 +1,12 @@
site
.bundle
.DS_Store
.sass-cache
.gist_cache
_cache
source
sass
public
source/_stash
source/stylesheets
source/javascripts/libs/node_modules
source/javascripts/libs/syntax-highlighter
vendor/ruby
_cache
.gist_cache
public
73 changes: 36 additions & 37 deletions Rakefile
Expand Up @@ -29,18 +29,40 @@ def ok_failed(condition)
end
end

desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
task :install, :theme do |t, args|
# copy theme into working Jekyll directories
theme = args.theme || 'classic'
puts "## Copying "+theme+" theme to Jekyll paths"
system "cp -R themes/"+theme+"/source source"
system "cp -R themes/"+theme+"/sass sass"
system "cp -R themes/"+theme+"/_plugins/ _plugins/"

# The directories source and sass are ignored for development, but when Octopress is installed
# Users must be able to commit these directories, so this removes those lines from the gitignore
puts "## Cleaning up..."
new_content = ""
File.read('.gitignore').each_line do |e|
new_content << e unless e.strip == 'source' || e.strip == 'sass'
end
File.open('.gitignore', 'w') do |io|
io << new_content
end
end

## if you're deploying with github, change the default deploy to push_github
desc "default push task"
task :push => [:push_rsync] do
end

desc "Generate and deploy task"
task :deploy => [:integrate, :generate, :clean_debug, :push] do
task :deploy => [:integrate, :generate, :push] do
end

desc "generate website in output directory"
task :generate => [:generate_site, :generate_style] do
puts ">>> Site Generating Complete! <<<\n\n>>> Refresh your browser <<<"
desc "Generate jekyll site"
task :generate do
puts "## Generating Site with Jekyll"
system "jekyll"
end

# usage rake post[my-new-post] or rake post['my new post'] or rake post (defaults to "new-post")
Expand Down Expand Up @@ -78,65 +100,42 @@ task :list do
puts "(type rake -T for more detail)\n\n"
end

desc "remove files in output directory"
task :clean do
puts ">>> Removing output <<<"
Dir["#{site}/*"].each { |f| rm_rf(f) }
end

task :clean_debug do
puts ">>> Removing debug pages <<<"
Dir["#{site}/test"].each { |f| rm_rf(f) }
end

desc "Generate styles only"
task :generate_style do
puts ">>> Generating styles <<<"
system "compass compile"
end

desc "Generate site files only"
task :generate_site => [:clean, :generate_style] do
puts "\n\n>>> Generating site files <<<"
system "jekyll"
end

desc "Watch the site and regenerate when it changes"
task :watch do
system "trap 'kill $jekyllPid $guardPid $compassPid' Exit; jekyll --auto & jekyllPid=$!; compass watch & compassPid=$!; guard & guardPid=$!; wait"
end

desc "generate and deploy website via rsync"
multitask :push_rsync do
puts ">>> Deploying website via Rsync <<<"
puts "## Deploying website via Rsync"
ok_failed system("rsync -avz --delete #{site}/ #{ssh_user}:#{document_root}")
end

desc "deploy website to github user pages"
multitask :push_github do
puts ">>> Deploying #{deploy_branch} branch to Github Pages <<<"
puts "## Deploying #{deploy_branch} branch to Github Pages "
require 'git'
repo = Git.open('.')
puts "\n>>> Checking out #{deploy_branch} branch <<<\n"
puts "\n## Checking out #{deploy_branch} branch \n"
repo.branch("#{deploy_branch}").checkout
(Dir["*"] - ["#{site}"]).each { |f| rm_rf(f) }
Dir["#{site}/*"].each {|f| mv(f, ".")}
rm_rf("#{site}")
puts "\n>>> Moving generated /#{site} files <<<\n"
puts "\n## Moving generated /#{site} files \n"
Dir["**/*"].each {|f| repo.add(f) }
repo.status.deleted.each {|f, s| repo.remove(f)}
puts "\n>>> Commiting: Site updated at #{Time.now.utc} <<<\n"
puts "\n## Commiting: Site updated at #{Time.now.utc} \n"
message = ENV["MESSAGE"] || "Site updated at #{Time.now.utc}"
repo.commit(message)
puts "\n>>> Pushing generated /#{site} files to #{deploy_branch} branch <<<\n"
puts "\n## Pushing generated /#{site} files to #{deploy_branch} branch\n"
repo.push
puts "\n>>> Github Pages deploy complete <<<\n"
puts "\n## Github Pages deploy complete\n"
repo.branch("#{source_branch}").checkout
end

desc "start up a web server on the output files"
task :start_server => :stop_server do
print "Starting serve..."
print "## Starting serve..."
system("serve #{site} #{port} > /dev/null 2>&1 &")
sleep 1
pid = `ps auxw | awk '/bin\\/serve #{site} #{port}/ { print $2 }'`.strip
Expand All @@ -148,9 +147,9 @@ desc "stop the web server"
task :stop_server do
pid = `ps auxw | awk '/bin\\/serve #{site} #{port}/ { print $2 }'`.strip
if pid.empty?
puts "Adsf is not running"
puts "## Adsf is not running"
else
print "Stoping adsf..."
print "## Stoping adsf..."
ok_failed system("kill -9 #{pid}")
end
end
Expand Down
36 changes: 26 additions & 10 deletions _config.yml
@@ -1,25 +1,41 @@
# Required configuration
source: source
destination: public
markdown: rdiscount
pygments: true

url: http://yoursite.com
title: My Octopress Blog
author: Your Name
email: you@domain.com #Add your email (optional) for the atom feed
subscribe_rss: /atom.xml
subscribe_email: http://feedburner.com/asdfasdf

markdown: rdiscount
pygments: true
recent_posts: 1
simple_search: http://google.com/search

recent_posts: 20
# Optional configurations

twitter_user: imathis
tweet_count: 3
show_replies: false
# For RSS
email:

# Twitter
#twitter_user: imathis
twitter_tweet_count: 4
twitter_show_replies: false
twitter_follow_button: true
twitter_show_follower_count: false
twitter_tweet_button: true

# Pinboard
#pinboard_user: imathis
pinboard_count: 3

# Delicious
delicious_user:
delicious_count: 3

pinboard_user: imathis
pinboard_count: 3
# Disqus Comments
disqus_short_name:

#disqus_short_name: designenthusiast
# Google Analytics
google_analytics_tracking_id:
17 changes: 0 additions & 17 deletions sass/screen.scss

This file was deleted.

12 changes: 0 additions & 12 deletions sass/themes/classic/_partials.scss

This file was deleted.

4 changes: 0 additions & 4 deletions sass/themes/classic/_style.scss

This file was deleted.

94 changes: 0 additions & 94 deletions sass/themes/classic/core/_layout.scss

This file was deleted.

44 changes: 0 additions & 44 deletions sass/themes/classic/core/_theme.scss

This file was deleted.

0 comments on commit d8b796a

Please sign in to comment.