Skip to content

Commit

Permalink
better serving it up instructions in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Jun 22, 2014
1 parent 8b3abef commit 9d3c168
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@ Open <http://localhost:4000> in your browser, and voilà.

### 4. Serving it up

If you host your code on GitHub, you can use [GitHub Pages](https://pages.github.com) to host your project. Simply create a `gh-pages` branch in your repository and push it to GitHub. Then head to `http://username.github.io/repo-name`.
If you host your code on GitHub, you can use [GitHub Pages](https://pages.github.com) to host your project.

No matter your production or hosting setup, be sure to check your `baseurl` setting in the `_config.yml` file. For the above example, you'll want to change it from `/` to `/repo-name`. If you have a `CNAME` or host this at the root level of a domain, like `http://example.com`, there's no need to change anything. Not setting this correctly will mean broken styles on your site.
1. Fork this repo and switch to the `gh-pages` branch.
2a. If you're [using a custom domain name](https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages), modify the `CNAME` file to point to your new domain.
2b. If you're not using a custom domain name, **modify the `baseurl` in `_config.yml`** to point to your GitHub Pages URL. Example: for a repo at `github.com/username/poole`, use `http://username.github.io/poole/`. **Be sure to include the trailing slash.**
3. Done! Head to your GitHub Pages URL or custom domain.

No matter your production or hosting setup, be sure to verify the `baseurl` option file and `CNAME` settings. Not applying this correctly can mean broken styles on your site.


## Options
Expand Down

0 comments on commit 9d3c168

Please sign in to comment.