mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-04-29 09:55:54 +08:00
Adding Firebase Hosting deployment documentation (#378)
* Adding first version of Firebase Hosting documentation * Renaming public to site for clarification
This commit is contained in:
@@ -39,6 +39,28 @@ pages:
|
|||||||
|
|
||||||
!> You can replace script with `- cp -r docs/. public`, if `./docs` is your Docsify subfolder.
|
!> You can replace script with `- cp -r docs/. public`, if `./docs` is your Docsify subfolder.
|
||||||
|
|
||||||
|
## Firebase Hosting
|
||||||
|
|
||||||
|
!> You'll need to install the Firebase CLI using `npm i -g firebase-tools` after signing into the [Firebase Console](https://console.firebase.google.com) using a Google Account.
|
||||||
|
|
||||||
|
Using Terminal determine and navigate to the directory for your Firebase Project - this could be `~/Projects/Docs` etc. From there, run `firebase init`, choosing `Hosting` from the menu (use **space** to select, **arrow keys** to change options and **enter** to confirm). Follow the setup instructions.
|
||||||
|
|
||||||
|
You should have your `firebase.json` file looking similar to this (I changed the deployment directory from `public` to `site`):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"hosting": {
|
||||||
|
"public": "site",
|
||||||
|
"ignore": [
|
||||||
|
"firebase.json",
|
||||||
|
"**/.*",
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
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 base project directory.
|
||||||
|
|
||||||
## VPS
|
## VPS
|
||||||
|
|
||||||
Try following nginx config.
|
Try following nginx config.
|
||||||
|
|||||||
Reference in New Issue
Block a user