Skip to content

About

Source for hotloop.io, the HotLoop industrial automation platform: Flow, Gateway, Edge and CODESYS HMI.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

hotloop.io

Source for hotloop.io, built with Astro and served by nginx on the mothership. A version tag (v*) runs .github/workflows/release.yml: build, the audits, an image, a check of the running container against the build, then the push to ghcr.io/hotloop-io/hotloop-io-site. A pull request to Embernet-ai/embernet-iac (sites.tf, the hotloop entry) rolls the image, applied by CI on merge. A pull request builds and checks everything and publishes nothing. docs.hotloop.io is a separate site.

npm install
npm run dev       # http://localhost:4321
npm run build     # regenerates the social cards and icons, then builds to dist/

Node 22.12 or newer is required, and .nvmrc pins the version CI uses.

How it is put together

  • Design tokens live in src/styles/tokens.css, a vendored copy of brand/tokens.css in HotLoop-io/HotLoop-io. CI fetches the canonical file and fails the build if the two differ, so change a value there first and then copy it here.
  • The license and terms text on /license and /terms is src/legal/LICENSE.md, a vendored copy of LICENSE.md in the same repository as the tokens. CI diffs it against the canonical file the same way. /terms renders src/legal/TERMS.md the same way, and the build fails if it has a [PLACEHOLDER] in it.
  • Fonts are Inter Variable and JetBrains Mono, self-hosted through @fontsource. Nothing loads from a CDN.
  • Integrations data is in src/data. protocols.json is written from the Gateway's protocol docs. nodes.json is generated from Flow's compatibility document with node scripts/import-flow-compat.mjs <path to compatibility.md>.
  • Release notes are markdown files in src/content/releases/<product>/<version>.md. To add one, add a file. Each states whether it has actually been published, and the page prints that.
  • Release notes in the other 13 languages are the same entry translated, in src/content/releases-i18n/<language folder>/<product>/<version>.md (front matter lang, product, version, summary, highlights, breaking, then the body). A new release entry is not done until its 13 translations are in the same PR: node scripts/i18n-check.mjs (the first step of npm run build) fails when an entry has no translation in a language, or when a translation changes a code span, a link, a version number, a code block, a heading or list item count, or drops a product name, or has an em or en dash. Keep product names, versions, code and links as they are. Entries a language has not caught up on are listed in src/content/releases-i18n/pending.json; the list only shrinks, and node scripts/rel-pending.mjs rewrites it from the files.
  • Social cards and icons are generated by scripts/og.mjs with all text converted to outlines, so nothing depends on a font being installed on the build machine.

Two rules the build enforces

astro build fails if a protocol claims to be verified live and names nothing it was verified against, if one claims decode-tested and does not say what is unverified, or if a Flow node is anything short of full compatibility and does not say what is different. The site cannot claim more than the repositories behind it do.

Sales-voice gate

node scripts/voice-gate.mjs dist runs every English page's copy through the sales-voice rules in sales-voice-gate/vale-gate (Vale, pinned in the script and fetched on first run) as the last step of the build. A hedge on our claims, a dead CTA, a disclaimer, "aligned" on a standard, a banned word, Raspberry Pi in HotLoop copy or a speed claim buyers argue with fails the build. The reading rules (grade 8, sentences of 20 words) are a ratchet against sales-voice-gate/baseline.json: a page may go down and never up. After a copy change that lowers a count, node scripts/voice-gate.mjs dist --write-baseline records the new floor.

Writing

No em-dashes as connectors, Oxford commas, American spelling. The reasoning is in the brand standard.

Serving and releasing

  • Image. Dockerfile puts stage/ (made by node scripts/stage-image.mjs dist stage after the build) on nginx-unprivileged with docker/nginx.conf. The stage step leaves out the pages that only forward (the old Gateway release notes address) and the Pages CNAME, and writes an nginx map so each of those addresses answers one real 301. Every response carries Strict-Transport-Security: max-age=63072000; includeSubDomains; preload.
  • Chart repositories. hotloop.io/hotloop/, /hotloop-flow/, /hotloop-cascade/, /hotloop-codesys/ and /hotloop-transmitter/ are the Helm repositories (helm repo add), each published to the gh-pages branch of its own repository. The index files name https://hotloop.io/<repo>/<chart>.tgz, so nginx answers those five paths by proxying to GitHub Pages with a minute of cache: first as Host hotloop.io (what Pages serves while hotloop.io is the org site's custom domain, which holds after DNS moves here), and when that answers 404, as Host hotloop-io.github.io (what Pages serves once the custom domain is retired; four of the five product repositories are private, so there is no tokenless raw source). A 301 from that second source is a real 404 and is answered as one. Neither state needs a change here. They need no change in the product repositories. scripts/release-fresh.mjs reads them through the same address.
  • Check. scripts/serve-check.sh http://localhost:3000 -H 'Host: hotloop.io' checks every built page, every forwarding address, the 404, the headers, the sitemap and the bot rules. With CHARTS=1 it also checks the five chart repositories, which answers the same before and after the custom domain is retired.
  • Release. Merge to main (a plain merge builds and releases nothing), the lead pushes vX.Y.Z, the run pushes the image, and a pull request to embernet-iac changes the image in sites.tf. Nobody runs helm or kubectl by hand.

About

Source for hotloop.io, the HotLoop industrial automation platform: Flow, Gateway, Edge and CODESYS HMI.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages