Giter Site home page Giter Site logo

google-drive-ghost-storage-adapter's Introduction

Ghost Google Drive

This is a Google Drive storage adapter for the Ghost Blog! It allows you to host your images on your own Google Drive!

This adapter is only for Ghost V > 1.x!

Installation

Via Git

To install this storage adapter, go through the following steps:

  • Create a new directory /storage inside /content/adapters

  • Clone this repo to /storage

    cd [path/to/ghost]/content/adapters/storage
    git clone https://github.com/glur4k/google-drive-ghost-storage-adapter.git
    
  • Install dependencies

    cd ghost-google-drive
    npm install
    
  • Create Google service account and copy your credentials (for example, see [https://github.com/robincsamuel/ghost-google-drive#create-oauth-credentials](Robin C Samuel's repo) - credits to him)

[Optional] If you want to upload the files to a shared Google Drive folder you can follow these instructions:

  • Open the settings.json in /content/adapters/storage/google-drive-ghost-storage-adapter
  • Fill in the ID for sharedFolderId or leave it empty ("")

To get the ID of the folder just share the desired folder via Google Drive, open it and copy the ID from the URL

Configuration

Add the following storage block to either your config.production.js our config.development.js and replace the key with your generated credentials:

"storage": {
  "active": "google-drive-ghost-storage-adapter",
  "google-drive-ghost-storage-adapter": {
    "key": {
      "type": "service_account",
      "project_id": "YOUR PROJECT ID",
      "private_key_id": "YOUR PRIVATE KEY ID",
      "private_key": "YOUR PRIVATE KEY",
      "client_email": "YOUR CLIENT EMAIL",
      "client_id": "YOUR CLIENT ID",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://accounts.google.com/o/oauth2/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "YOUR CERT URL"
    }
  }
}

License

Read LICENSE

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

Thanks to Robin C Samuel. His repo inspired this.

google-drive-ghost-storage-adapter's People

Contributors

vo0doo avatar

Stargazers

McKay Galeano Adams avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.