Static site for bitwebcore.net, built with Eleventy (11ty).
- Node.js 18 or later
- npm (comes with Node.js)
npm installStarts a local dev server with live reload at http://localhost:8080:
npm startOutputs to _site/:
npm run buildsrc/
├── _data/
│ ├── i18n/
│ │ ├── en.json # English translations
│ │ └── ru.json # Russian translations
│ ├── locales.json # ["en", "ru"]
│ ├── rpc.json # Generated RPC docs data (see contrib/doc-gen)
│ └── site.js # Global site metadata (URL, GitHub links, etc.)
│
├── _includes/
│ ├── layouts/
│ │ ├── base.njk # Root HTML layout (head, nav, footer)
│ │ ├── post.njk # Blog post layout — wraps markdown content
│ │ └── rpc.njk # RPC docs layout (sidebar + content)
│ └── partials/
│ ├── nav.njk # Navigation bar
│ └── footer.njk # Footer
│
├── static/
│ ├── css/
│ │ ├── bootstrap.min.css
│ │ └── custom.css # All project-specific styles — edit this
│ ├── js/
│ │ ├── theme.js # Dark/light/auto theme switcher
│ │ ├── home.js # Fetches latest release tag from GitHub
│ │ ├── download.js # Fetches and renders release download cards
│ │ ├── lifecycle.js # Fetches release history, shows support status
│ │ └── rpc-sidebar.js # Accordion + search for RPC method sidebar
│ ├── favicon.ico
│ ├── favicon.svg
│ └── apple-touch-icon.png
│
├── en/blog/ # English blog posts (markdown only — see below)
├── ru/blog/ # Russian blog posts (markdown only)
│
├── development/rpc/ # RPC docs pages → /en/development/rpc/ and /ru/development/rpc/
│
├── index.njk # Home page → /en/ and /ru/
├── about.njk # About → /en/about/ and /ru/about/
├── blog/index.njk # Blog index → /en/blog/ and /ru/blog/
├── brand.njk # Brand page → /en/brand/ and /ru/brand/
└── ... # Other pages follow the same pattern
contrib/
├── new-post.sh # CLI script to create a new blog post
└── doc-gen/
└── generate.js # RPC documentation generator
Every page template lives in src/ (or a subdirectory). A single .njk file generates
both /en/page/ and /ru/page/ via Eleventy pagination:
---
pagination:
data: locales
size: 1
alias: locale
permalink: "/{{ locale }}/page-name/"
---
{%- set t = i18n[locale] -%}src/en/ and src/ru/ are for blog posts only. No .njk templates go in there.
All UI text lives in src/_data/i18n/en.json and src/_data/i18n/ru.json.
Never hardcode display text inside templates — add a key to both JSON files instead.
./contrib/new-post.sh "Post Title" # today's date
./contrib/new-post.sh "Post Title" 2026-07-15 # custom dateNews posts are English only. Russian and other locale mirrors are generated
automatically at /ru/blog/slug/ — no extra steps needed.
The filename encodes the date — no date: key needed in frontmatter:
src/en/blog/post_DD_MM_YYYY.md
Examples:
post_07_06_2026.md → 7 Jun 2026
post_15_07_2026.md → 15 Jul 2026
Eleventy parses the date automatically from the filename at build time.
---
layout: layouts/post.njk
locale: en
title: "Post Title"
summary: "Short description shown on the blog index."
permalink: /en/blog/my-post-slug/
# Optional — for release posts:
# github_release: "https://github.com/bitweb-project/bitweb/releases/tag/vX.Y"
# github_release_label: "GitHub Release vX.Y"
# download_url: /en/wallets/full-node/
# release_notes: "https://github.com/bitweb-project/bitweb/blob/master/doc/release-notes/release-notes-X.Y.md"
---When github_release, download_url, or release_notes are set, the layout renders
the action buttons automatically — no HTML needed in the post body.
Write the post content as standard Markdown. No HTML tags.
Regular paragraph. **Bold**, *italic*, `inline code`.
## Section heading
> Blockquote — rendered as a highlighted note with an accent left border.
- List item one
- List item two
```code block```
[Link text](https://example.com)The RPC method list is generated from a live node and stored in src/_data/rpc.json.
To regenerate it:
-
Add the node binaries to PATH (adjust version as needed):
export PATH="$HOME/bitweb-30.3/bin:$PATH"
-
Start
bitwebdin regtest with RPC enabled:bitwebd -regtest -daemon -server=1 -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1
Regtest is recommended — starts instantly, no blockchain sync required.
-
Run the generator from the project root:
cd ~/bitwebcore node contrib/doc-gen/generate.js
Outputs
src/_data/rpc.jsonwith all methods across all categories. -
Stop the node:
bitweb-cli -regtest stop
-
Build and commit:
npm run build git add src/_data/rpc.json git commit -m "rpc: regenerate docs for v30.3"
To use a non-default binary path:
node contrib/doc-gen/generate.js --cli /path/to/bitweb-cliThese apply to all templates, scripts, and styles. The only Russian text allowed is inside
src/_data/i18n/ru.json — translations are a separate concern from the codebase itself.
const/letonly — nevervar- No inline JS inside
.njktemplates — JS lives insrc/static/js/*.js <script src="...">in templates is fine;<script>code here</script>is not
- No
style="..."attributes on HTML elements - All styles go in
src/static/css/custom.css
- No
.njkfiles insidesrc/en/orsrc/ru/— those folders are for blog markdown only - One template generates both
/en/page/and/ru/page/via pagination (see above) - Internal links always use
/{{ locale }}/path/— never hardcode/en/or/ru/ - Never use
i18n.enori18n.rudirectly — alwaysi18n[locale]
- All code comments, variable names, template comments, and file names are in English
- Russian exists only in
src/_data/i18n/ru.jsonand in theRU Русскийlanguage switcher label
Source: src/whitepaper.md. Renders as a web page at /en/whitepaper/ and /ru/whitepaper/, also available as a PDF download.
To regenerate the PDF after editing the whitepaper:
bash contrib/generate-pdf.shThen commit src/static/whitepaper.pdf. Requires pandoc and wkhtmltopdf:
apt install pandoc wkhtmltopdfSame workflow as RPC docs — generate locally, commit the artifact, the build just serves it.