Skip to content

Cap-go/website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,416 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Capgo website

Capgo - Instant updates for capacitor Discord Discord npm GitHub latest commit https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg Security Rating Bugs Maintainability Rating Code Smells Vulnerabilities Quality Gate Status Technical Debt Open Bounties Rewarded Bounties

This is the source code for the Capgo website, built with Astro and deployed on Cloudflare Workers.

Monorepo layout

The repo is now a bun workspace with two Astro apps:

  • apps/web: the marketing site and product pages
  • apps/docs: the documentation site powered by Starlight

Both apps keep the current public URL structure on capgo.app, but they deploy as two different Cloudflare Workers:

  • apps/web/wrangler.jsonc: handles the main site
  • apps/docs/wrangler.jsonc: handles /docs*, /{locale}/docs*, and /_docs*

The docs worker uses a dedicated asset prefix (/_docs) so both Workers can coexist on the same domain without asset collisions.

Documentation

  • Live docs: https://capgo.app/docs/
  • English docs content: apps/docs/src/content/docs/docs
  • Localized docs content: apps/docs/src/content/docs/<locale>/docs

Development

Install dependencies once from the repo root:

bun install

Run the marketing site locally:

bun run dev:web

Run the documentation site locally:

bun run dev:docs

Deployment

Deployments are handled with wrangler deploy.

  • bun run deploy:web deploys the main website worker
  • bun run deploy:docs deploys the documentation worker
  • bun run deploy is intentionally disabled so docs and web cannot be published together

The main deploy workflow only publishes one worker per push:

  • docs-only changes publish the docs worker
  • web-only changes publish the web worker
  • mixed docs/web changes, or shared changes that affect both apps, must be split before merge and are rejected by the deploy workflow

Manual deployments also require choosing a single worker target, and production deploys are serialized so docs and web are never published at the same time.

Project structure

Key folders and files in this repo:

/
├── apps/
│   ├── web/
│   │   ├── public/
│   │   ├── src/
│   │   │   ├── components/
│   │   │   ├── content/
│   │   │   │   ├── blog/
│   │   │   │   └── plugins-tutorials/
│   │   │   ├── pages/
│   │   │   ├── config/
│   │   │   └── content.config.ts
│   │   ├── astro.config.mjs
│   │   └── wrangler.jsonc
│   └── docs/
│       ├── public -> ../web/public
│       ├── src/
│       │   ├── components/
│       │   ├── content/
│       │   │   ├── docs/
│       │   │   └── i18n/
│       │   ├── css/
│       │   └── content.config.ts
│       ├── astro.config.mjs
│       └── wrangler.jsonc
├── messages/
├── scripts/
└── package.json

Astro routes for the website live in apps/web/src/pages/. The docs site is powered by Starlight in apps/docs/.

Commands

All commands are run from the repo root:

Command Action
bun install Install workspace dependencies
bun run dev:web Start the marketing site locally
bun run dev:docs Start the docs site locally
bun run build:web Build the website app
bun run build:docs Build the docs app
bun run build Build both apps
bun run check Run astro check for both apps
bun run preview:web Preview the website locally
bun run preview:docs Preview the docs locally
bun run deploy:web Deploy the website worker
bun run deploy:docs Deploy the docs worker
bun run deploy Fails intentionally to prevent deploying both workers together
bun run astro -- --help Get help using the Astro CLI

Automatic i18n

The repo uses scripts in scripts/ to maintain translated content.

When adding a new locale, the relevant content now lives in:

  • Website pages and blog content under apps/web/src
  • Documentation content under apps/docs/src

Useful commands:

  • bun run setup:new:locale
  • bun run docs:translate_all
  • bun run blogs:translate_all
  • bun run plugins:translate_all

License

The source code is licensed under the GNU AFFERO GENERAL PUBLIC license. See the LICENSE file for details.

About

Capgo landing website + documentation

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors