An open API service indexing awesome lists of open source software.

https://github.com/paulpietzko/astro-sheets

Astro Sheets is an open-source project that allows the use of Google Sheets as a headless CMS. This solution leverages the simplicity and accessibility of Google Sheets to manage content, while providing a robust API to integrate with your applications.
https://github.com/paulpietzko/astro-sheets

astro astrosheets cms google googlesheets googlesheetsapi headless-cms template

Last synced: over 1 year ago
JSON representation

Astro Sheets is an open-source project that allows the use of Google Sheets as a headless CMS. This solution leverages the simplicity and accessibility of Google Sheets to manage content, while providing a robust API to integrate with your applications.

Awesome Lists containing this project

README

          

# Astro-Sheets: Google Sheets as a Headless CMS

Astro-Sheets allows you to turn Google Sheets into a simple, lightweight headless CMS for building blogs or content-driven static sites using the Astro framework. Perfect for small projects or static sites needing easy, dynamic content management.

🌟 Demo: [astro-sheets.vercel.app](https://astro-sheets.vercel.app)
πŸ“– Detailed Guide: [Google Sheets as a Simple CMS](https://medium.com/@paul.pietzko/google-sheets-as-a-simple-cms-18ed6c8b838e)
πŸ“¦ GitHub Template: [astro-sheets](https://github.com/paulpietzko/astro-sheets)

## ✨ Features

- Headless CMS using Google Sheets as the backend.
- Dynamic Content: Update your Google Sheets and reflect changes instantly on your site.
- SEO-friendly: Powered by Astro's SSR for optimal performance.
- Lightweight and Easy to Use: No complex setupβ€”just Google Sheets and a few lines of code.

## πŸš€ Getting Started

1. **Clone the Template**
```bash
git clone https://github.com/paulpietzko/astro-sheets
cd astro-sheets
npm install
```

2. **Set Up Google Sheets as a CMS**
- Create a Google Sheet with columns like Title, Author, Date, and Content.
- Follow the guide to create a WebApp Script for Google Sheets to fetch your data dynamically.
- Deploy the script and copy the resulting URL.

3. **Connect Your Sheet to Astro**
- Replace the Google Sheets WebApp URL in `src/pages/index.astro` with your own:
```javascript
const res = await fetch("");
const data = await res.json();
```

4. **Run the Project**
- Start the development server:
```bash
npm run dev
```
- Visit the local server at `http://localhost:4321` to see your blog in action!

## πŸ› οΈ Project Structure

Your project includes the following:

```text
/
β”œβ”€β”€ public/ # Static assets
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ pages/ # Pages like index.astro
β”‚ └── components/ # Reusable UI components
└── package.json # Project configuration
```

## 🧞 Commands

| Command | Action |
|-----------------------|---------------------------------------------------|
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Builds the production site to `./dist/` |
| `npm run preview` | Previews your build locally before deployment |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 🌍 Live Demo

Check out the live demo here: [astro-sheets.vercel.app](https://astro-sheets.vercel.app)

## πŸ‘€ Learn More

- Detailed Guide: [Google Sheets as a Simple CMS](https://medium.com/@paul.pietzko/google-sheets-as-a-simple-cms-18ed6c8b838e)
- Astro Documentation: [docs.astro.build](https://docs.astro.build)

## πŸ“œ License

This project is licensed under the MIT License.