aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-22 00:03:11 -0400
committerBrandon Mathis <brandon@imathis.com>2011-07-22 00:03:11 -0400
commit12aed03eea27534168a1a5edb7c484fdf24b5937 (patch)
tree328892f88da591c38f106ee22fc747495b984353
parent39d56bc98834b09fc6939fd27bde8848efbb251d (diff)
downloadmy_new_personal_website-12aed03eea27534168a1a5edb7c484fdf24b5937.tar.xz
my_new_personal_website-12aed03eea27534168a1a5edb7c484fdf24b5937.zip
updated rakefile and config to support url mapping in previous commit
Diffstat (limited to '')
-rw-r--r--Rakefile8
-rw-r--r--_config.yml4
2 files changed, 6 insertions, 6 deletions
diff --git a/Rakefile b/Rakefile
index df1add6d..9b6327c3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -201,12 +201,14 @@ task :set_root_dir, :dir do |t, args|
end
jekyll_config = IO.read('_config.yml')
jekyll_config.sub!(/^destination:.+$/, "destination: public#{dir}")
- jekyll_config.sub!(/^subscribe_rss:.+$/, "subscribe_rss: #{dir}/atom.xml")
- jekyll_config.sub!(/^root:.*$/, "root: #{dir}")
+ jekyll_config.sub!(/^subscribe_rss:\s*\/.+$/, "subscribe_rss: #{dir}/atom.xml")
+ jekyll_config.sub!(/^root:.*$/, "root: /#{dir.sub(/^\//, '')}")
File.open('_config.yml', 'w') do |f|
f.write jekyll_config
end
- mkdir_p "public#{dir}"
+ rm_rf public_dir
+ mkdir_p "#{public_dir}#{dir}"
+ puts "## Site's root directory is now '/#{dir.sub(/^\//, '')}' ##"
end
end
diff --git a/_config.yml b/_config.yml
index 5e53a6d7..b801db16 100644
--- a/_config.yml
+++ b/_config.yml
@@ -19,9 +19,7 @@ email:
# ----------------------- #
# If publishing to a subdirectory as in http://site.com/project set 'root: /project'
-# If blank, urls will be mapped to '/'
-root:
-
+root: /
port: 4000
permalink: /blog/:year/:month/:day/:title
source: source