{"id":13858557,"url":"https://github.com/netlify/jekyll-gdrive","last_synced_at":"2025-07-14T00:31:30.849Z","repository":{"id":24491571,"uuid":"27896338","full_name":"netlify/jekyll-gdrive","owner":"netlify","description":"Access a Google Drive Spreadsheet from your Jekyll templates","archived":true,"fork":false,"pushed_at":"2020-05-26T17:58:24.000Z","size":13,"stargazers_count":116,"open_issues_count":7,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-12T11:20:32.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netlify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-11T23:10:08.000Z","updated_at":"2023-04-20T21:34:52.000Z","dependencies_parsed_at":"2022-08-22T18:00:35.370Z","dependency_job_id":null,"html_url":"https://github.com/netlify/jekyll-gdrive","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fjekyll-gdrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fjekyll-gdrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fjekyll-gdrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fjekyll-gdrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlify","download_url":"https://codeload.github.com/netlify/jekyll-gdrive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225929998,"owners_count":17547091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T03:02:13.290Z","updated_at":"2024-11-22T16:31:18.430Z","avatar_url":"https://github.com/netlify.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Jekyll Gdrive Plugin\n\nAccess data from a Google Drive Spreadsheet in your Jekyll sites\n\n## Installation\n\nAdd these lines to your Gemfile:\n\n```ruby\ngroup :jekyll_plugins do\n  gem 'jekyll-gdrive'\nend\n```\n\nAnd then execute:\n\n    $ bundle install\n\n## Usage\n\nBefore you can access any data from GDrive you need to configure your GDrive API credentials. After installing the plugin, run:\n\n    $ bundle exec jekyll gdrive\n\nAnd follow the instructions to create an application in Google's developer console and generate a refresh token.\n\nOnce you have the token, you need to set it up as an environment variable before running `jekyll build`. The GDrive plugin will give you an export statement you can use to setup your environment:\n\n    $ export GDRIVE=\u003cclient_id\u003e:\u003cclient_secret\u003e:\u003cyour gdrive token\u003e\n\nYou'll also need to configure the plugin to use the right spreadsheet.\n\nAdd this to your `_config.yml`:\n\n```yaml\ngdrive:\n  sheet: \"title of my spreadsheet\"\n```\n\n## Accessing your Google Sheet data\n\nIn any Liquid template you can now use: `site.data.google_sheet` to access your sheet data.\n\nExample:\n\n```html\n\u003ctable\u003e\n    \u003cthead\u003e\n      {% for row in site.data.google_sheet limit:1 %}\n        \u003ctr\u003e\n          {% for col in row %}\u003cth\u003e{{col}}\u003c/th\u003e{% endfor %}\n        \u003c/tr\u003e\n      {% endfor %}\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n      {% for row in site.data.google_sheet offset:1 %}\n        \u003ctr\u003e\n          {% for col in row %}\u003ctd\u003e{{col}}\u003c/td\u003e{% endfor %}\n        \u003c/tr\u003e\n      {% endfor %}  \n    \u003c/tbody\u003e\n  \u003c/table\u003e\n```\n\n## Caching\n\nGoogle's Drive API is not incredibly fast. When working in `jekyll serve --watch` mode you'll quickly get tired of waiting for the spreadsheet data to load on every refresh.\n\nTo work around this you can specify a cache period for the gdrive plugin in the Jekyll configuration:\n\n```yaml\ngdrive:\n   sheet: \"My sheet\"\n   cache_period: 5 minutes\n```\n\nThis will store the sheet in a local `_gdrive_cache` file and only reload the sheet data once every 5 minutes.\n\nYou can specify the time in `seconds`, `minutes` or `hours`.\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/jekyll-gdrive/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Fjekyll-gdrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlify%2Fjekyll-gdrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Fjekyll-gdrive/lists"}