Skip to content

Commit

Permalink
Update hosting instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jstcki committed Apr 18, 2018
1 parent bf38e27 commit 5a9a294
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/configuration/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ responsiveSizes: [
],
pages: [
...
```

## Routing
Expand All @@ -27,15 +26,24 @@ pages: [

`boolean`

To maximize compatibility, Catalog uses hash-based routing (e.g. `my-styleguide.com/#/about`) by default. If your web server is [configured properly](http://readystate4.com/2012/05/17/nginx-and-apache-rewrite-to-support-html5-pushstate/), it can also use HTML5 pushstate-based routing, so you get "real" URLs (e.g. `my-styleguide.com/about`). Set `useBrowserHistory` to `true` to enable this.
To maximize compatibility, Catalog uses hash-based routing (e.g. `my-styleguide.com/#/about`) by default. It can also use HTML5 pushstate-based routing, so you get "real" URLs (e.g. `my-styleguide.com/about`). Set `useBrowserHistory` to `true` to enable this.

```hint
GitHub Pages doesn't support this style of routing without [hacks](https://github.com/rafrex/spa-github-pages). Instead, you can use:
- [Netlify](https://www.netlify.com/)
- [Surge](http://surge.sh/)
- [now](https://zeit.co/docs/examples/create-react-app)
- [Any nginx or Apache server that you can configure](http://readystate4.com/2012/05/17/nginx-and-apache-rewrite-to-support-html5-pushstate/)
```

### `basePath`

`string`

If you want Catalog to run under a certain base path, e.g. `my-styleguide.com/catalog/about`, set the `basePath` configuration option. The base path will be prefixed to all page paths.

This only works best together with `useBrowserHistory`.
This works best together with `useBrowserHistory`.

#### Route Settings Example

Expand Down

0 comments on commit 5a9a294

Please sign in to comment.