This is the source of the Open Home Foundation website, built with Astro.
Requires Node.js (see .nvmrc for the version).
npm install
npm run dev # start a dev server at http://localhost:4321
npm run build # build the production site into dist/
npm run preview # serve the built site locallysrc/pages/— one file per page (Astro pages, plus markdown papers)src/content/blog/— blog posts (markdown)src/layouts/,src/components/— shared templatessrc/styles/,src/scripts/— CSS and client-side JavaScript, bundled by Astrosrc/data/— YAML data (authors, documents, hardware press kits)public/— static files copied verbatim (documents, images, fonts, badges, redirects)list/— the Plausible referrer allowlist and site registry (validated on every build)
This site serves the shared Plausible loader used by every Open Home Foundation site. A site enables analytics with a single tag and nothing else — no build step, no init code:
<script async src="https://www.openhomefoundation.org/plausible.js?site=example.org"></script>The loader (generated by src/pages/plausible.js.ts) looks the ?site= value
up in list/plausible-sites.json to find that site's Plausible script id,
installs a referrer filter, and then loads the site's real Plausible script.
Sites that trigger their own pageviews (single-page apps, custom routing) add
&manual to the tag: nothing is tracked automatically and the page calls
plausible("pageview") itself. This is the current-generation replacement for
Plausible's legacy script.manual.js, which predates transformRequest and
therefore cannot enforce the referrer filter — with &manual the same script
is loaded with automatic pageviews off, and the filter still applies to every
event, since transformRequest is set once at init and runs on every request
the tracker makes for the lifetime of the page.
The filter replaces any referrer not on list/allowed-referrers.txt with
https://unlisted.invalid/, so visitors arriving from their own Home Assistant
or ESPHome instance never have their private URL recorded.
Both list files are validated by src/lib/referrers.js on every build (an
invalid entry fails the build), and both are baked into /plausible.js at
build time — deploying this site updates the allowlist for every embedding
site, including ones without a build workflow (e.g. Squarespace, the forums).
The allowlist is also published as
/allowed-referrers.json.
To add a site: put a "domain": "script-id" pair in list/plausible-sites.json
(the script id is the pa-… filename part from Plausible's Site Installation
page), then add the tag above to the site with ?site=<domain>. Full registry
documentation is in src/lib/plausible-sites.js, since JSON can't carry
comments.
This website is automatically deployed with Cloudflare pages on each commit to the main branch.
This repository also contains the badges for various projects and partners to use with permission. Below are examples of how these are to be used in a repository.
[](https://www.openhomefoundation.org/)[](https://www.openhomefoundation.org/)[](https://www.openhomefoundation.org/)[](https://www.openhomefoundation.org/)


