Page generator
scripts/gen-pages.py · scripts/lib/catalog.py
gen-pages.py scaffolds the inner pages from a Python catalog of services and tracks, so a repeated service card cannot differ between two pages.
Studio buildDesigned and built by the studio itself — an internal project used as proof of method, not a client deliverable.
Architecture, system rules, decisions & documented evidence.
CODE & CANVAS / NATIVE PLATFORM
A bilingual studio site rebuilt as native static HTML — 82 pages, zero runtime dependencies, and an Arabic twin generated from the English page so the two can never drift apart.
82
Static HTML pages
00
Runtime dependencies
32
axe accessibility scans
23
Services published
Data path
partials + catalog → committed HTML → build.sh → dist
Page count is the index.html inventory (41 routes × English + Arabic); the zero is package.json's own dependencies block.
Tell me what you need and we can define deliverables, timing and cost. A finished brief is optional.

01 / The challenge
The live Code & Canvas site was WordPress + Elementor Pro + Astra + WooCommerce, and its own sitemap was broken — a 500 on sitemap.xml and 404s across the numbered sitemap files. A studio selling architecture and design was running on a stack it could not inventory.
Worse for a bilingual MENA practice: Arabic was a parallel site, translated after the fact. Every English edit left the Arabic page behind, and nothing in the build could tell you when it happened.
The native rebuild answers both with the same move: the committed HTML is the deliverable. The chrome is synced from partials, the Arabic page is generated from the finished English page, and `npm run check` regenerates everything in a temp directory and diffs it against what is committed.
Core decision: no runtime dependencies and no server includes. What is committed is what is served — and a check command proves it.
02 / Architecture
Every script below runs at authoring time. The served site is only HTML, CSS and JS files — nothing executes to assemble a page.
scripts/gen-pages.py · scripts/lib/catalog.py
gen-pages.py scaffolds the inner pages from a Python catalog of services and tracks, so a repeated service card cannot differ between two pages.
partials/*.html · scripts/sync-chrome.mjs
Every page carries three marker pairs (cc:head · cc:top · cc:bottom). sync-chrome rewrites what sits between them from partials, and --check fails CI the moment a page drifts.
scripts/gen-ar.mjs · scripts/lib/arize.mjs
gen-ar.mjs derives /ar/<route>/index.html from the finished English page, so the twin always matches in structure. A test asserts the markup itself carries the Arabic.
npm run check · npm run check:generated
check-generated re-runs all three generators in a temp directory and diffs the output against the committed tree — so 'the HTML is final' is a tested claim, not a comment.
partials + catalog
Python + Node, authoring
committed HTML
82 pages, EN + AR
build.sh → dist
Copy only, no transforms
build.sh is deliberately dumb: it copies the committed HTML into dist/ and generates an .htaccess from _redirects for the Hostinger origin. The build cannot change a page.
03 / Product decisions
package.json has no dependencies block at all — only Playwright and axe as dev tools. A site that sells engineering cannot be a supply-chain liability.
Header, footer and preloader live once, in partials. They are stamped into every page between markers, and --check turns any manual edit into a failing build instead of a slow divergence.
gen-ar.mjs builds the Arabic twin from the finished English page. The failure mode of every bilingual site — an Arabic page six months behind — is designed out of the generator.
build.sh copies files and generates .htaccess. There is no minification, no bundling, no transform that can differ from what was reviewed. What a reviewer read is what ships.
The axe suite runs 16 routes twice — once at 1440px in English, once at 390px in Arabic — scrolling every page to reveal below-fold sections before scanning. 32 real scans, not one homepage pass.
The repo ships an ASSET-AND-CLAIM-REGISTER that labels its three SVG scope diagrams as conceptual illustrations — not screenshots, not outcome evidence — and lists what must be approved before anything stronger is published.
04 / Delivery
$1,000–5,000 · 2–8 weeks · roadmap and governance model, via a scoped inquiry flow.
From $2,500 · 3–5 weeks · scored criteria and a defensible decision record.
$1,490–2,975+ · 5–7 weeks · 25–40 page guidelines plus a workshop.
From $1,500 · 6–8 weeks · identity, bilingual site and launch system together.
An interactive proposal: modules, industries, compliance, timeline, a package builder and print-to-PDF — the proposal is the product demo.
05 / Evidence
82
index.html pages (41 EN + 41 AR)
from repo
00
Runtime dependencies
from repo
32
axe scans (16 routes × 2 languages)
from repo
52
Routes inventoried from the old site
from repo
The 52-route sitemap snapshot (docs/sitemap.json) was captured from the WordPress site on 2026-10-14: 40 live, 6 missing, 2 duplicate, 2 redirect, 1 auth. It is a migration inventory, not a claim about the native site's coverage.
The repository's own claim register states that its three SVG work illustrations are conceptual and are not product screenshots or business-outcome evidence. This file repeats that limit rather than presenting them as case evidence.
No client results, testimonials or traffic figures appear here — the repository explicitly says none were fabricated and lists them as owner-controlled publication gates.
06 / Technology stack
The only `dependencies` a visitor downloads are the CSS and JS files in assets/. The generators and test tools never reach production.
HAND-OFF / 012
Open in the repo: the owner-controlled publication gates — real screenshots for Pharmacy OS and Zad, plus permission before any of them becomes case evidence.
Want the practical business breakdown—what this project does, how it runs, and its core advantages?
Tell me what you need and we can define deliverables, timing and cost. A finished brief is optional.
NEXT CASE ↳ FROM THE FILES