Overview 🧐
WebSheets Listing Page is an open-sourced Gatsby template that generates listing/directory websites based on Google Sheets data. The generated website will be a fast-loading static progressive web app with SEO and offline capabilities.
Features
- Google Sheets as Content Management System (CMS)
- Fast loading static site
- Offline capable Progressive Web App (PWA)
- SEO Optimised
- Google analytics configured
- Mobile responsive design
- Dark/light mode
- Share-to-socials button
- Multiple layout combinations
- Call to action buttons
Sponsor Development
If you find this project helpful in any way, you can support my coffee intake in making this at https://www.buymeacoffee.com/sohafidz. ☕️
Getting Started 🚀
Project Requirements
- Node
- Gatsby CLI
npm install -g gatsby-cli
Preparing the Project
Step 1: Preparing your Sheets data
- Make a copy of this google sheets template
- Change the privacy setting to allow anyone with the link to view
- Click the share button and change the privacy to
Anyone on the Internet with this link can view
- Click the share button and change the privacy to
- Fill in the google sheets with the general site information (on the
site
tab) and details of items you want to list *on thelisting
tab)- The tab names (
site
,listing
) should NOT be changed.
- The tab names (
Step 2: Preparing your Google API key
- Create a Google API project
- Enable Google Sheets API for that project
- Click the ENABLE button and select the project that you created
- Create the Google API key for that project
- Click CREATE CREDENTIALS button and select API key
Step 3: Preparing the Repository
- Run
gatsby new [YOUR_SITE_NAME] tengkuhafidz/WebSheets-Listing-Page
- Create
.env
file on the project root and add the following environment variablesGATSBY_GOOGLE_CREDENTIALS
="Google-Api-Key-With-Quatations"GATSBY_SHEET_URL
="Google-Sheets-URL-With-Quotations"
Running the Project
Running on Dev Environment
- Run
npm start
- Your site will run at
http://localhost:8000
- You graphiql will run at
http://localhost:8000/___graphql
- Your site will run at
Running on Prod Environment
- Run
npm run build
- Run
npm run serve
- Your site will run at
http://localhost:9000
- Your site will run at
Troubleshooting
Having an issue? The following are common setup mistakes that might have caused it. Please ensure that the following are set properly.
- Google Sheets privacy settings MUST minimally be set to
Anyone on the Internet with this link can view
- Google Sheets API MUST be
ENABLED
for the project that you're using the API key of - The value of environment variables MUST be in between double quotations
- Ensure that you have a
.env
file on your project root with the following params:GATSBY_GOOGLE_CREDENTIALS
,GATSBY_SHEET_URL
Underlying Tech 🦾
Main Frameworks & API
- Gatsby
- Typescript
- TailwindCSS
- Google Sheets API
With prettier, eslint, and husky configured out of the box.
Folder Structure
.
├── node_modules
├── src
├── static
├── .gitignore
├── .eslintrc.js
├── .prettierrc.js
├── gatsby-browser.js
├── gatsby-config.js
├── LICENSE
├── yarn-lock.json
├── package.json
├── tailwind.config.js
├── postcss.config.js
└── README.md
About
Contact
You may contact me via email at h@fidz.dev.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.