Skip to content

About

Official Bitty website and published documentation frontend

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Bitty Website

Static Astro site for bitty.run.

Scope

The site has two product surfaces:

  • a small Hero page with verified installation paths, a native-extension and Lua-plugin overview derived from the pinned manual, and release links;
  • one shared documentation template for the canonical bitty-manual in English and Simplified Chinese.

There is no server-side search, account system, comments, CMS, runtime Markdown rendering, in-site plugin installation, blog system, or independent architecture-document portal. Search is a small client-side enhancement over a static JSON index.

Content and distribution

bitty-manual is the only documentation source consumed by the site. The deploy workflow runs bun run sync:manual, which fetches the immutable locale archives from Cloudflare R2, verifies the SHA-256 values in src/content/manual.lock.json, checks the archive paths, and materializes the Markdown under src/content/manual/.

The public R2 layout is:

https://cdn.bitty.run/manual/bitty-manual/
├── manifest.json
├── search-index.json
├── en.tar.gz
├── zh-CN.tar.gz
└── v<manual-version>/
    ├── manifest.json
    ├── search-index.json
    ├── en.tar.gz
    └── zh-CN.tar.gz

Product release artifacts use the separate R2 namespace:

https://cdn.bitty.run/releases/<tag>/

The website does not infer artifact names from a directory listing. The install section is driven by src/data/installChannels.ts: a channel appears as available only after its repository, manifest, or artifact is published, and just check-channels re-verifies every advertised endpoint against the current install/latest.txt pointer. Channels that are planned but not published stay in the pending list without copyable commands.

Routes

/                              English Hero
/zh-CN/                        Simplified Chinese Hero
/docs/                         English manual index
/docs/<section>/<page>/       English manual page
/zh-CN/docs/                   Simplified Chinese manual index
/zh-CN/docs/<section>/<page>/ Simplified Chinese manual page

Each document is rendered by src/components/ManualPage.astro. Navigation, ordering, titles, locale parity, and archive metadata come from the manual manifest rather than from duplicated website route data.

Advancing the pinned manual

src/content/manual.lock.json is the only mutable pointer. A versioned R2 object is expected to be immutable, so advancing the site means publishing a new manual version and moving the lock:

# 1. Capture the digests of the new immutable objects.
curl -fsSL https://cdn.bitty.run/manual/bitty-manual/v<version>/en.tar.gz | sha256sum
curl -fsSL https://cdn.bitty.run/manual/bitty-manual/v<version>/zh-CN.tar.gz | sha256sum

# 2. Update version, paths, and digests in the lock.

# 3. Re-materialize and verify.
bun run sync:manual && just check

The lock covers the two locale archives. The site derives its own search index from the verified Markdown, so no separate index artifact is pinned.

Never republish content under an existing version. When a digest changes without a version bump, sync:manual fails closed on purpose: overwriting a versioned object breaks the reproducibility the lock exists to guarantee.

Development

bun install --frozen-lockfile
bun run sync:manual
bun run dev

Quality checks:

just check          # offline gates: format, lint, tests, build, a11y, dry-run
just check-channels # live gate: every advertised install channel

just check-channels needs network access; run it whenever the install section or the release pointer changes and record its output as evidence.

The production target is Cloudflare Workers Static Assets. The repository does not publish or mutate R2 objects during a website build.

About

Official Bitty website and published documentation frontend

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages