{"id":22358251,"url":"https://github.com/michaelheckmann/astro-cloudflare-cms","last_synced_at":"2026-05-05T08:32:26.347Z","repository":{"id":266368551,"uuid":"898020204","full_name":"michaelheckmann/astro-cloudflare-cms","owner":"michaelheckmann","description":"Boilerplate for setting up a simple CMS together with an Astro site","archived":false,"fork":false,"pushed_at":"2025-01-16T11:50:05.000Z","size":377,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T22:42:53.049Z","etag":null,"topics":["astro","cloudflare","cms"],"latest_commit_sha":null,"homepage":"https://acc-blog.pages.dev/","language":"TypeScript","has_issues":false,"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/michaelheckmann.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-03T16:39:52.000Z","updated_at":"2025-02-09T03:55:17.000Z","dependencies_parsed_at":"2024-12-03T23:31:22.692Z","dependency_job_id":"a1230274-ff09-42c7-a233-a385b2e85b65","html_url":"https://github.com/michaelheckmann/astro-cloudflare-cms","commit_stats":null,"previous_names":["michaelheckmann/astro-cloudflare-cms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michaelheckmann/astro-cloudflare-cms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelheckmann%2Fastro-cloudflare-cms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelheckmann%2Fastro-cloudflare-cms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelheckmann%2Fastro-cloudflare-cms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelheckmann%2Fastro-cloudflare-cms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelheckmann","download_url":"https://codeload.github.com/michaelheckmann/astro-cloudflare-cms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelheckmann%2Fastro-cloudflare-cms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32642007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["astro","cloudflare","cms"],"created_at":"2024-12-04T15:13:23.132Z","updated_at":"2026-05-05T08:32:26.320Z","avatar_url":"https://github.com/michaelheckmann.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"1398\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a3b8ad95-5644-4194-892f-9a80257f7b35\"\u003e\n\n# Astro Cloudflare CMS\n\nThis is a boilerplate for setting up a simple CMS together with an Astro site.\n\n## Features\n\n- **PNPM Workspace**: PNPM workspaces for dependency management\n- **Biome**: [Biome](https://biomejs.dev/) for linting and formatting\n- **Simple CMS**: Inspired by [Pages CMS](https://pagescms.org/)\n- **Typesafe Schema**: Typesafe schema for the CMS by using Zod\n- **Astro Blog**: A simple blog setup with Astro consuming the CMS data\n- **Cloudflare Pages**: Cloudflare Pages for deployment\n- **Local Support**: Run the CMS locally and modify the files on your machine\n- **Github as a Database**: Use Github as a database for the CMS\n\n## Getting Started\n\n1. **Clone the repository**\n2. **Install dependencies**: Run `pnpm install`\n3. **Set the environment variables**: Create a personal access token on Github and set it in `cms/.dev.vars`\n3. **Configure the CMS**: Update the `cms/src/config.ts` file with the structure you want\n4. **Run the CMS**: Run `cd cms \u0026\u0026 pnpm dev:local`\n5. **Run the Astro site**: Run `cd web \u0026\u0026 pnpm dev`\n\n## Environment Variables\n\nLearn more about the process of creating a personal access token on Github [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). Make sure the token has read and write access to the repository you have specified in the `cms/src/config.ts` file.\n\n## Configuration\n\nThe CMS is configured in the `cms/src/config.ts` file. Explore the config schema in `cms/src/lib/schema.ts`.\n\n## Deployment\n\n\u003e [!IMPORTANT]  \n\u003e There is no built-in authentication in the CMS. Make sure to secure the CMS via Cloudflare Access or similar.\n\nBoth the CMS and the Astro site can be deployed to Cloudflare Pages. Make sure to set the Github Personal Access Token environment variables in the Cloudflare Pages dashboard for the CMS. The Astro site will consume the CMS data from the Github repository, so no additional environment variables are needed.\nWith this setup, no additional database or CI/CD setup is needed. The Github repository acts as a database and Cloudflare Pages as the CI/CD pipeline which is triggered on every push to the repository.\n\n### Cloudflare Pages and Github Actions\n\nMake sure you have created a Cloudflare Pages project before running the auto-deploy Github Action.\n\nTo create the project, run the following command:\n\n```bash\nnpx wrangler pages project create \u003cREPLACE_ME_PROJECT_NAME\u003e\n```\n\nUse these Github Actions to deploy the CMS and the Astro site to Cloudflare Pages.\n\n`.github/workflows/cms-deployment.yml`\n\n```yaml\nname: CMS Deployment\non:\n  push:\n    branches: [main]\n    paths: [\"cms/**\"]\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    name: Deploy to Cloudflare Pages\n    permissions:\n      contents: read\n      deployments: write\n    steps:\n      - uses: actions/checkout@v4\n      - name: Setup pnpm\n        uses: pnpm/action-setup@v4\n        with:\n          version: 9\n      - name: Install and Build\n        run: cd cms \u0026\u0026 pnpm install \u0026\u0026 pnpm run build          \n      - name: Deploy\n        uses: cloudflare/wrangler-action@v3\n        with:\n          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}\n          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}\n          packageManager: pnpm\n          workingDirectory: cms\n          # Currently, only worker secrets are supported, page secrets need to be handled manually\n          # https://github.com/cloudflare/wrangler-action/issues/304\n          preCommands: |\n            echo '{\"_GITHUB_PAT\": \"${{ secrets._GITHUB_PAT }}\"}' \u003e .env.json\n          command: |\n            pages secret bulk .env.json\n            pages deploy dist\n          gitHubToken: ${{ secrets.GITHUB_TOKEN }}\n```\n\n`.github/workflows/web-deployment.yml`\n\n```yaml\nname: Web Deployment\non:\n  push:\n    branches: [main]\n    paths: [\"web/**\"]\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    name: Deploy to Cloudflare Pages\n    permissions:\n      contents: read\n      deployments: write\n    steps:\n      - uses: actions/checkout@v4\n      - name: Setup pnpm\n        uses: pnpm/action-setup@v4\n        with:\n          version: 9\n      - name: Install and Build\n        run: cd web \u0026\u0026 pnpm install \u0026\u0026 pnpm run build\n      - name: Deploy\n        uses: cloudflare/wrangler-action@v3\n        with:\n          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}\n          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}\n          packageManager: pnpm\n          workingDirectory: web\n          command: pages deploy dist --project-name=\u003cREPLACE_ME_PROJECT_NAME\u003e\n          gitHubToken: ${{ secrets.GITHUB_TOKEN }}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelheckmann%2Fastro-cloudflare-cms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelheckmann%2Fastro-cloudflare-cms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelheckmann%2Fastro-cloudflare-cms/lists"}