android.moparisthebest.org/source/docs/deploying/_subdir.markdown

44 lines
1.2 KiB
Markdown
Raw Normal View History

<h2 id="deploy_subdir">Deploying to a Subdirectory</h2>
2011-09-19 13:19:20 -04:00
If you're deploying to a subdirectory on your site, or if you're using Github's project pages, make sure you set up your urls correctly in your configs.
You can do this *almost* automatically:
``` sh
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:
``` sh
# _config.yml
url: http://yoursite.com/your/path
# Rakefile (if deploying with rsync)
document_root = "~/yoursite.com/your/path"
```
To manually configure deployment to a subdirectory, you'll change `_config.yml`, `config.rb` and `Rakefile`.
Here's an example for deploying a site to the /awesome subdirectory:
2011-09-19 13:19:20 -04:00
``` sh
# _config.yml
destination: public/awesome
url: http://example.com/awesome
subscribe_rss: /awesome/atom.xml
root: /awesome
2011-09-19 13:19:20 -04:00
# config.rb - for Compass & Sass
http_path = "/awesome"
http_images_path = "/awesome/images"
http_fonts_path = "/awesome/fonts"
css_dir = "public/awesome/stylesheets"
2011-09-19 13:19:20 -04:00
# Rakefile
public_dir = "public/awesome"
2011-09-19 13:19:20 -04:00
# If deploying with rsync, update your Rakefile path
document_root = "~/yoursite.com/awesome"
2011-09-19 13:19:20 -04:00
```