updated rakefile and config to support url mapping in previous commit
This commit is contained in:
parent
39d56bc988
commit
12aed03eea
8
Rakefile
8
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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user