Skip to content

About

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

bitanon.dev

Home of Bitanon open-source projects, with docs synced from each project. Today that is three Dart packages (convertlib, hashlib and cipherlib); the registry is built for any kind of project.

Built with Astro, Starlight and Tailwind CSS. Deployed to GitHub Pages.

How it works

Nothing about the libraries is written by hand here. At build time, scripts/sync.mjs clones every repo in projects.config.mjs and pulls live stats from pub.dev, then generates:

  • / — the brand homepage with a filterable project showcase (src/pages/index.astro)
  • /<project>/ — an overview with highlights, quickstart, benchmark charts, capabilities and the latest release (src/pages/[slug]/index.astro)
  • /<project>/guide/, /benchmarks/, /changelog/ and one page per file in the library's docs/ folder (Starlight, generated into src/content/docs/)
  • /<project>/api/ — the API reference, generated with dart doc from the version published on pub.dev (scripts/apidocs.mjs) and given the site header and theme after the build (src/integrations/api-docs.mjs). Its canonical URLs point at pub.dev, and library and top-level symbol pages are in the site search. Needs a Dart SDK on PATH; without one, local builds link to pub.dev instead (CI fails)
  • /blog/ — news and release notes, with an RSS feed at /blog/rss.xml. Every CHANGELOG release published on or after site.blog.releasesSince gets a post, dated by its pub.dev (or GitHub) release. Hand-written posts are markdown files in src/content/blog/ with title, description, date and optional project front matter; draft: true posts show only in npm run dev or a build with SHOW_DRAFTS=1 (src/lib/blog.ts)
  • /og/<page>.png — a 1200×630 social preview card for every page above, rendered with Satori and sharp (src/lib/og.ts, src/pages/og/[...key].png.ts) and wired into the og:image / twitter:image tags

The site rebuilds when a library is released, nightly, and on pushes here. See docs/library-integration.md for the token and the workflow snippet each library needs.

Adding a project

Add one entry to projects.config.mjs. A pub.dev package:

{
  slug: 'newlib',
  name: 'newlib',
  repo: 'bitanon/newlib',
  kind: 'library',
  languages: ['Dart'],
  tags: ['Networking'],
  category: 'Something',
  accent: '#ff5c8a',
  glyph: 'N',
},

Anything else (an app, a CLI, a package in another language) sets registry: 'none'; its version then comes from the latest GitHub release:

{
  slug: 'newapp',
  name: 'New App',
  repo: 'bitanon/newapp',
  kind: 'app',
  languages: ['Kotlin'],
  tags: ['Productivity'],
  registry: 'none',
  platforms: ['android'],
  homepage: 'https://play.google.com/store/apps/details?id=…',
  install: 'brew install newapp', // optional
  status: 'beta',
  accent: '#38bdf8',
  glyph: 'A',
},

The homepage builds its filters (type, language, topic) from whatever values appear in the registry, and only shows a filter group once it has two or more values. Related projects can share a collection to get a featured band.

Development

npm install
npm run dev        # sync + dev server on http://localhost:4321/
npm run build      # sync + static build into dist/

Set LOCAL_REPOS_DIR=.. to read sibling checkouts instead of cloning, for previewing unreleased README or docs changes. Set BASE_PATH=/some/path/ to serve from a sub-path instead of /.

About

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages