Marketing site + blog for Cosmonats by bitsbeam.
Plain static HTML / CSS / JS — no build step, no dependencies, apart from rake docs (see Docs).
The company site lives next door in ../bitsbeam.com/ and shares assets/application.css + application.js —
keep both copies identical.
/
├── index.html # home: rocket hero, blog teaser, journey, code
├── blog/
│ ├── cron-without-a-cron-box.html # #002 (hidden: unlisted, noindex)
│ └── why-we-beamed-off-redis.html # #001 (latest)
├── docs/ # generated by `rake docs`, never edit by hand
│ ├── index.html # redirects to introduction.html
│ └── <slug>.html
├── projects/cosmonats/ # git submodule, the source of docs/
├── tools/docs/ # docs builder: kramdown + Rouge, page.html.erb
└── assets/
├── application.css # all styles: tokens, base, components, home, post, docs
├── application.js # all behaviour: starfield, beam, journey, copy, reading progress, docs nav
└── img/
└── logo.svg
One stylesheet, one script. Each JS module is a self-contained IIFE loaded with defer and wired up through
data-* attributes, so pages work straight from the filesystem (file://) and on any static host.
Open index.html in a browser, or serve the folder:
bundle install
bundle exec rake # http://localhost:8000, override with PORT=3000The docs are written in the gem's repository, docs/<n>-<slug>.md, so they read fine on GitHub too. rake docs
renders them into docs/<slug>.html, ordered by <n>, with a sidebar, an "on this page" list and prev/next cards.
Links between docs (9-batches.md#notes) become links between pages, any other relative link points to the file on
GitHub, and code is highlighted with the same tok-* classes as the hand-written samples.
git submodule update --init --remote # pull the latest cosmonats main
bundle exec rake docs # or COSMONATS=../cosmonats to build from a local checkoutCommit the regenerated docs/ with the submodule bump. The Docs workflow (.github/workflows/docs.yml) does
that daily: when the latest cosmonats release isn't in the submodule yet, it checks the submodule out at that tag,
rebuilds, and pushes. Run it by hand with a ref (main, a tag, a commit) to publish docs fixes between releases.
Sidebar groups live in Docs::Builder::GROUPS
(tools/docs/builder.rb); a page missing from them lands under "More".
Upload the folder as-is to GitHub Pages, Netlify, Cloudflare Pages, S3, etc.
- Colors / fonts / radii — edit the variables in
:rootat the top ofassets/application.css. - Journey vehicle — on
<section class="journey">setdata-vehicle="rocket"or"ufo";data-trail="false"hides the glowing trail. - Waypoints — add or remove
<li class="journey__stop" data-stop>items; the path re-draws automatically. - Stars —
data-densityanddata-parallaxon the<canvas data-starfield>.
Code samples use hand-tagged spans so there's no runtime highlighter:
| class | used for |
|---|---|
tok-k |
keywords (class, def, end, true) |
tok-c |
constants / class names |
tok-s |
symbols, hash keys |
tok-l |
strings, numbers |
tok-m |
method names |
- Copy the newest file in
blog/toblog/<slug>.htmland replace title, meta, date and body. - Pager links
- New post: left card → previous post (“← Older”), right card →
../index.html#journey. - Previous post: change its right card to point at the new post (“Newer →”).
- New post: left card → previous post (“← Older”), right card →
- Home page (
index.html,#blog):- Replace the
.post-featurecard with the new post (keep theLatestbadge). - Move the previous featured post to the top of
.post-listas a.post-row. - Bump the “N transmissions received” counter.
- Replace the
MIT © bitsbeam