aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB Mathis <brandon@imathis.com>2009-10-31 23:17:29 -0500
committerB Mathis <brandon@imathis.com>2009-10-31 23:17:29 -0500
commitcc8985df55983b7701acb04e62a24fc4d3c559d7 (patch)
tree2e5fbc19458bea14181e0c1b6eeb20f62d4e35fd
parent58d342b5afafda3e6b114c9b81754ac6e3a3dd18 (diff)
downloadmy_new_personal_website-cc8985df55983b7701acb04e62a24fc4d3c559d7.tar.xz
my_new_personal_website-cc8985df55983b7701acb04e62a24fc4d3c559d7.zip
fixed a few issues with the rakefile, and updated the readme
Diffstat (limited to '')
-rw-r--r--README.markdown38
-rw-r--r--Rakefile18
2 files changed, 45 insertions, 11 deletions
diff --git a/README.markdown b/README.markdown
index 83ed09e7..a671be87 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,13 +1,41 @@
-= What is Octopress?
+# What is Octopress?
+Octopress gives developers a well designed starting point for a Jekyll blog. It's easy to configure and easy to deploy. Sweet huh?
-Octopress gives developers a well designed starting point for their blog. It's easy to configure and easy to deploy. Sweet huh?
+## Why?
+1. Building a Jekyll blog from scratch is a lot of work.
+2. Jekyll doesn't have default layouts or themes.
+3. Most developers don't want to do design.
-== Octopress uses
+## Octopress is made of
- [Jekyll](http://github.com/henrik/jekyll) a blog aware static site generator (Henrik's fork adds [HAML](http://haml-lang.com) support)
- [Compass](http://compass-style.org) an awesome [SASS](http://sass-lang.com) framework.
- [FSSM](http://github.com/ttilley/fssm/tree/master) + a rake task, automatically regenerates the blog as you work.
- [Serve](http://github.com/jlong/serve) for live previews of the site while in development
- [Rsync](http://samba.anu.edu.au/rsync/) for easy deployment.
-= Setup
-- add gem install instructions \ No newline at end of file
+## Setup
+#### First, clone Octopress locally.
+ git clone git://github.com/imathis/octopress.git
+#### Second, install required gems
+ sudo gem install henrik-jekyll
+ sudo gem install compass-edge
+ sudo gem install fssm
+ sudo gem install serve
+
+#### Third
+1. Edit the top of the Rakefile settings to match your web hosting info.
+2. Edit the top of the atom.haml and _layout/default.haml
+
+## Usage
+You should really read over the [Jekyll wiki](http://wiki.github.com/mojombo/jekyll) because most of your work will be using Jekyll. Beyond that Octopress is mostly some rake tasks, HAML, and SASS/Compass that has been meticulously crafted for ease of use and modification.
+
+### Rake tasks
+rake preview: Generates the site, starts the local web server, and opens your browser to show the generated site.
+
+rake watch: Watches the source for changes and regenerates the site every time you save a file. You'll forget your working with a static site.
+
+rake deploy: Generates the site and then uses rsync (based on your configurations in the Rakefile) to synchronize with your web host. In order to use rsync you'll need shell access to your host, and you'll probably want to use your public key for authentication.
+
+rake stop_serve: Kills the local web server process.
+
+*There are more but these are the ones you'll use the most. Read the Rakefile if you want to learn more* \ No newline at end of file
diff --git a/Rakefile b/Rakefile
index 31076377..08b29185 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,14 +1,15 @@
require 'active_support'
+## -- CHANGE FOR YOUR PROJECT -- ##
+site_url = "http://yoursite.com" # deployed site url
+ssh_user = "user@host.com" # for rsync deployment
+document_root = "~/document_root/" # for rsync deployment
+## ---- ##
+
port = "4000" # preview project port eg. http://localhost:4000
site = "site" # compiled site directory
source = "source" # source file directory
-# MUST CHANGE FOR YOUR PROJECT
-site_url = "http://yoursite.com" # deployed site url
-ssh_user = "user@host.com" # for rsync deployment
-document_root = "~/document_root/" # for rsync deployment
-
def ok_failed(condition)
if (condition)
puts "OK"
@@ -29,6 +30,11 @@ task :clean do
Dir["#{site}/*"].each { |f| rm_rf(f) }
end
+task :clean_debug do
+ puts "Removing debug pages..."
+ Dir["#{site}/debug"].each { |f| rm_rf(f) }
+end
+
desc "generate website in output directory"
task :generate => :clean do
puts "Generating website..."
@@ -56,7 +62,7 @@ task :watch do
end
desc "generate and deploy website"
-task :deploy => :generate do
+multitask :deploy => [:generate, :clean_debug] do
print "Deploying website..."
ok_failed system("rsync -avz --delete #{site}/ #{ssh_user}:#{document_root}")
end