Source for docs.horizen.io — developer documentation for Horizen, an EVM-identical L3 on Base using the OP Stack.
npm install
npm run startSearch does not work in dev mode — run
npm run build && npm run serveto test search locally.
There are two sets of variables depending on where they are consumed.
Build-time (Docusaurus, read via process.env at npm run build): Docusaurus does not load .env files natively, so set these as shell environment variables before building:
# Algolia search — optional; search falls back to local index without these
export ALGOLIA_APP_ID=your_app_id
export ALGOLIA_API_KEY=your_api_key
export ALGOLIA_INDEX_NAME=your_index_name
# Turnstile — build-time only (embedded in the page bundle)
# For local dev the value below is Cloudflare's always-pass test site key; no dashboard needed.
export TURNSTILE_SITE_KEY=1x00000000000000000000AAOr inline for a one-off build:
TURNSTILE_SITE_KEY=your_key npm run buildIn CI/CD (e.g. Cloudflare Pages), set these in the project's Settings → Environment Variables under the Build environment.
Runtime (Cloudflare Pages Functions, never bundled into the client): stored in .dev.vars locally and in the Pages project's Settings → Environment Variables for deployed environments.
| Variable | Type | Description |
|---|---|---|
BEEHIIV_API_KEY |
Secret | beehiiv API key |
PUBLICATION_ID |
Secret | beehiiv publication ID |
TURNSTILE_SECRET_KEY |
Secret | Cloudflare Turnstile secret for server-side verification |
Production setup: all three runtime variables must be set in the Pages project's Production environment (and Preview, if you want
/api/subscribeto work on preview deployments). Without them every subscription attempt returns an error.
The newsletter endpoint (/api/subscribe) runs as a Cloudflare Pages Function. Docusaurus's dev server does not execute these functions — use Wrangler instead.
- Copy the example vars file:
cp .dev.vars.example .dev.vars.dev.vars.example ships with Cloudflare's always-pass test keys pre-filled for TURNSTILE_SECRET_KEY, so the form works locally without a real Cloudflare account. Fill in real BEEHIIV_API_KEY and PUBLICATION_ID values if you want actual subscriptions to go through, or leave them blank to test the flow up to the beehiiv call.
.dev.vars is gitignored and never committed.
- Build the site and start Wrangler's local Pages dev server:
npm run build
npx wrangler pages dev ./buildThe site and all API endpoints are then available at http://localhost:8788.
- Fork the repo and create a branch
- Make your changes under
docs/ - Run
npm run startto preview - Open a pull request against
main
npm run buildOutputs to /build. The LLM discovery files (/llms.txt, /llms-full.txt, /llms-ctx.txt) are generated automatically at build time.