Skip to content

Vasilio777/ghost-google-drive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ghost Google Drive

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

Via NPM

  • 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).

Via Git

In order to replace the storage module, the basic requirements are:

  • Create a new folder inside /content called /storage

  • Clone this repo to /storage

    cd [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.

Create OAuth credentials

  • Login to google console
  • Create new project from the top right dropdown
    new project
  • Select Drive API below Google Apps APIs
    drive api
  • Click Enable
    enable
  • You will be suggested to create credentials. Click Go to Credentials
    go to credentials
  • Select service account link
    service account
  • You will be redirected to permissions page. Click Create service account
    create
  • Input necessary data
    input
  • After clicking Create button, google will generate a json file with the credentials for you. Save it and don't lose!

Configuration

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.

License

Read LICENSE

Feel free to create an issue, in case of troubles!

Thanks to Minwe. I was following your package, even this readme!

About

Google drive storage for ghost

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%