1.0.0 • Published 4 years ago

source-google-drive v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Gatsby Source Gdrive

This plugin takes the following params and does the following:

  • Key: Authorizes service account to access google drive
  • Folder ID: Looks in this folder for files
  • Destination: Downloads files from folder in drive and puts them in your local file tree at this destination

Here's an example from my gatsby-config.js:

    {
      resolve: 'gatsby-source-gdrive',
      options: {
        folderId: GOOGLE_DRIVE_FOLDER_ID,
        key: GOOGLE_DRIVE_SERVICE_ACCOUNT_KEY,
        destination: path.join(__dirname, 'src/drive')
      }
    },

Limitations

Does not export google documents. I'm using this mostly for images!

Acknowledgment

Based this off one of the existing google-drive source plugins. Sorry I can't remember which one, I tried a few and ran into some issues and this plugin was created in attempt to fix them.