code wiki / _hdl_build / nx_site_pages.nx

nx_site_pages.nx

buildroot/runtime/_hdl_build/nx_site_pages.nx

8027 B156 linesdepth 7pulls 14 transitivereach 1 importersview sourcekind tooltopic site
docsdependenciesstructsconstsfunctions

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

nx_site_compose.nx nx_syscalls.nx nx_site_pages.nx nx_site_pages_gate.nx

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

main sp_w sys_write sys_exit sp_gen_file sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_mkdir sp_cat sys_openat_wr compose_build sys_mmap ↻ cmp_get cmp_klen cmp_line_match cmp_streq cmp_videos cmp_line_match ↻ cmp_copy vid_build vid_w sys_write ↻ vid_esc sys_mmap ↻ hs_escape hs_emit hs_emitb sys_write ↻ sgg_build sys_mmap ↻ cst_read sys_openat_rd ↻ sys_read ↻ sys_close ↻ sgg_put

structs

none

consts

14const K_MAGIC_16384: i64 = 16384

functions

16func 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 }
called by 1: main calls 1: sys_write
17func 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 }
20func sp_slug(title: *u8, out: *u8) -> i64
called by 1: sp_gen_file
39func sp_field(val: *u8, idx: i64, out: *u8) -> i64
called by 1: sp_gen_file
50func sp_slice(text: *u8, start: i64, end: i64, out: *u8) -> i64
called by 1: sp_gen_file
61func sp_build_practice(text: *u8, tn: i64, ctitle: *u8, cdesc: *u8, firm: *u8, cta: *u8, href: *u8, out: *u8) -> i64
called by 1: sp_gen_file calls 2: cmp_line_matchsp_cat
90func sp_gen_file(config_path: *u8, docroot: *u8) -> i64
144func main(argc: i64, argv: *i64) -> i64