Google drive storage for ghost allows you to store the contents on google drive. I believe its helpful if you are gonna host your ghost app on heroku.
Will work with version higher than 0.6.0 of Ghost!
-
Installation from NPM.
npm install --save ghost-google-drive -
Create storage module.
Create injex.js file with folder path content/storage/ghost-google-drive/index.js (manually create folder if not exist).
In order to replace the storage module, the basic requirements are:
-
Create a new folder inside
/contentcalled/storage -
Clone this repo to
/storagecd [path/to/ghost]/content/storage git clone https://github.com/robincsamuel/ghost-google-drive.git -
Install dependencies
cd ghost-google-drive npm install
You can add ghost-google-drive, bluebird, googleapis to dependencies in Ghost's package.json.
- Login to google console
- Create new project from the top right dropdown
- Select
Drive APIbelowGoogle Apps APIs
- Click
Enable
- You will be suggested to create credentials. Click
Go to Credentials
- Select
service accountlink
- You will be redirected to
permissionspage. ClickCreate service account
- Input necessary data
- After clicking
Createbutton, google will generate a json file with the credentials for you. Save it and don't lose!
In your config.js file, you'll need to add a new storage block to whichever environment you want to change:
storage: {
active: 'ghost-google-drive',
'ghost-google-drive': {
key: {
"private_key_id": "YOUR PRIVATE KEY ID",
"private_key": "YOUR PRIVATE KEY",
"client_email": "YOUR CLIENT EMAIL",
"client_id": "YOUR CLIENT ID",
}
}
}We just need to replace the key object with your json array generated by google console.
Read LICENSE
Feel free to create an issue, in case of troubles!
Thanks to Minwe. I was following your package, even this readme!






