diff --git a/docs/deploy.md b/docs/deploy.md index 573d396e77..a806b82a1d 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -58,14 +58,14 @@ Your `firebase.json` file should look similar to this (I changed the deployment Once finished, build the starting template by running `docsify init ./site` (replacing site with the deployment directory you determined when running `firebase init` - public by default). Add/edit the documentation, then run `firebase deploy` from the root project directory. -## VPS +## Nginx -Use the following nginx config. +Use the following Nginx configuration. ```nginx server { listen 80; - server_name your.domain.com; + server_name your.domain.com; location / { alias /path/to/dir/of/docs/; @@ -74,6 +74,22 @@ server { } ``` +If [`routerMode`](configuration.md#routermode) is set to `history`, use this configuration instead: + +```nginx +server { + listen 80; + server_name your.domain.com; + + root /path/to/dir/of/docs; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +} +``` + ## Netlify 1. Login to your [Netlify](https://www.netlify.com/) account. diff --git a/src/core/router/history/html5.js b/src/core/router/history/html5.js index 9903e46986..48729b57f5 100644 --- a/src/core/router/history/html5.js +++ b/src/core/router/history/html5.js @@ -63,4 +63,6 @@ export class HTML5History extends History { response: {}, }; } + + normalize() {} }