code wiki / _hdl_build / nx_site_pages.nx
nx_site_pages.nx
buildroot/runtime/_hdl_build/nx_site_pages.nx
about
nx_site_pages.nx -- DATA-DRIVEN multi-page site generator (operator: finish the andelinwest WEBSITE -- the
visitor content off the root domain). The homepage `.site` config already lists the practice areas as cards;
the onsite search links each to /practice/<slug>, but those pages did not exist (dangling search results). This
organ reuses the PROVEN composer (nx_site_compose compose_build -- the same block-walk that builds the homepage,
so practice pages match the brand by construction) to emit, into a per-domain docroot served by the content
router (nx_host_router hr_serve3):
/index.html -- the homepage (compose the original config)
/practice/<slug>.html -- one branded landing page per card; slug = lowercased title, spaces->'-', so
"Family Law" -> family-law EXACTLY matches the search URL (no dangling link).
Nishi emits the HTML (never hand-authored); pure composition over existing organs. The live /search ENDPOINT
(dynamic query->results) + the deploy are separate rungs. license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_site_compose.nxnx_syscalls.nx
imported by: nx_site_pages_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 14 | const K_MAGIC_16384: i64 = 16384 |
functions
| 16 | func sp_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 17 | func sp_cat(out: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[o] = s[i]; o = o + 1; i = i + 1 } return o } |
| 20 | func sp_slug(title: *u8, out: *u8) -> i64 called by 1: sp_gen_file |
| 39 | func sp_field(val: *u8, idx: i64, out: *u8) -> i64 called by 1: sp_gen_file |
| 50 | func sp_slice(text: *u8, start: i64, end: i64, out: *u8) -> i64 called by 1: sp_gen_file |
| 61 | func sp_build_practice(text: *u8, tn: i64, ctitle: *u8, cdesc: *u8, firm: *u8, cta: *u8, href: *u8, out: *u8) -> i64 |
| 90 | func sp_gen_file(config_path: *u8, docroot: *u8) -> i64 |
| 144 | func main(argc: i64, argv: *i64) -> i64 |