根据Octopress文档,如果您在子目录中部署,则需要更新以下文件:
如果您正在部署到站点上的子目录,或者您正在使用
Github的项目页面,确保在
您的配置。您几乎可以自动执行此操作:
rake set_root_dir[your/path]
# To go back to publishing to the document root
rake set_root_dir[/] Then update your _config.yml and Rakefile as follows:
# _config.yml
url: http://yoursite.com/your/path
# Rakefile (if deploying with rsync)
document_root = "~/yoursite.com/your/path"
要手动将部署配置到子目录,您将更改_config.yml,>config.rb和Rakefile。下面是一个将站点部署到/真棒的示例
子目录:
# _config.yml
destination: public/awesome
url: http://example.com/awesome
subscribe_rss: /awesome/atom.xml
root: /awesome
# config.rb - for Compass & Sass
http_path = "/awesome"
http_images_path = "/awesome/images"
http_fonts_path = "/awesome/fonts"
css_dir = "public/awesome/stylesheets"
# Rakefile
public_dir = "public/awesome"
# If deploying with rsync, update your Rakefile path
document_root = "~/yoursite.com/awesome"
来源:
http://octopress.org/docs/deploying/subdir/