{"id":15641008,"url":"https://github.com/philhawksworth/example-read-from-sheets","last_synced_at":"2025-04-30T09:06:37.396Z","repository":{"id":47979358,"uuid":"202311860","full_name":"philhawksworth/example-read-from-sheets","owner":"philhawksworth","description":"A small example site to demonstrate pulling data from Google Sheets in an Eleventy build","archived":false,"fork":false,"pushed_at":"2023-01-09T22:23:22.000Z","size":1153,"stargazers_count":30,"open_issues_count":15,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T06:23:48.214Z","etag":null,"topics":["eleventy","google-sheets","jamstack","netlify"],"latest_commit_sha":null,"homepage":"https://read-from-google-sheets.netlify.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philhawksworth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-14T08:51:18.000Z","updated_at":"2024-02-11T19:46:17.000Z","dependencies_parsed_at":"2023-02-08T15:00:16.211Z","dependency_job_id":null,"html_url":"https://github.com/philhawksworth/example-read-from-sheets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"philhawksworth/eleventyone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philhawksworth%2Fexample-read-from-sheets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philhawksworth%2Fexample-read-from-sheets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philhawksworth%2Fexample-read-from-sheets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philhawksworth%2Fexample-read-from-sheets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philhawksworth","download_url":"https://codeload.github.com/philhawksworth/example-read-from-sheets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242627304,"owners_count":20160260,"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":["eleventy","google-sheets","jamstack","netlify"],"created_at":"2024-10-03T11:40:57.512Z","updated_at":"2025-03-09T00:31:02.930Z","avatar_url":"https://github.com/philhawksworth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Netlify Status](https://api.netlify.com/api/v1/badges/acfc2936-e6da-4242-88a5-ef27b3765059/deploy-status)](https://app.netlify.com/sites/read-from-google-sheets/deploys)\n\n# Read from Google Sheets API with Eleventy\n\n\u003e Example site: https://read-from-google-sheets.netlify.com/\n\nThis site is an example of using [Eleventy's JavaScript Data Files](https://www.11ty.io/docs/data-js/) which simplify sourcing content from remote data sources and making them available as  objects to use globally across an Eleventy site.\n\nThe site is pulling content from a read-only Google Sheets feed at build time.\n\n\n## Instructions\n\nTo get your own instance of this 11ty example project cloned and deploying to Netlify very quickly, just click the button below and follow the instructions.\n\n[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/philhawksworth/example-read-from-sheets)\n\n\n## Wait, what happens when I click that button?\n\nGood question. Here's what it will do...\n\n1. Netlify will clone the git repository of this project into your Github account. It will be asking for permission to add the repo for you.\n2. We'll create a new site for you in Netlify, and configure it to use your shiny new repo. Right away you'll be able to deploy changes simply by pushing changes to your repo.\n3. That's it really.\n\n## Changing the data source\n\nThere are a couple of steps required to expose the content from your Google Sheet as a JSON API.\n\n1. Create a google sheet and format it with column names in the first row. The JSON feed generated will use these column names.\n2. You'll use the unique ID of the sheet from its URL to address it later.\n    - For example: `https://docs.google.com/spreadsheets/d/1CfI6XGm9OjjNKGr3kXRSKVLui_gkHZdadoOPIiNgE9s/edit#gid=0`\n    - Where: `https://docs.google.com/spreadsheets/d/{SHEET_ID}/edit#gid=0`\n3. After creating you sheet, you need to publish it to the web. Do this from the **File menu in Google Sheets. Select the option to publish the sheet as a web page.\n4. Check that you can now access the JSON feed of the sheet, using your Sheet ID in a URL using this convention:\n   - `https://spreadsheets.google.com/feeds/list/{SHEET_ID}/od6/public/values?alt=json`;\n5. Specify the Sheet ID to be used when constructing the request URL in [`/src/site/_data/prod/sheet.js`](/src/site/_data/prod/sheet.js#L8)\n\n## Local development\n\n### Prerequisites\n\n- [Node and NPM](https://nodejs.org/)\n\n\n## Running locally\n\n```bash\n# install the dependencies\nnpm install\n\n# External data sources can be stashed locally for API-less dev\nnpm run seed\n\n# It will then be available locally for building with:\nnpm run start\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilhawksworth%2Fexample-read-from-sheets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilhawksworth%2Fexample-read-from-sheets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilhawksworth%2Fexample-read-from-sheets/lists"}