code wiki / _hdl_build / nx_ims_page.nx

nx_ims_page.nx

buildroot/runtime/_hdl_build/nx_ims_page.nx

9004 B203 linesdepth 9pulls 13 transitivereach 9 importersview sourcekind librarytopic ims
docsdependenciesstructsconstsfunctions

about

nx_ims_page.nx -- THE REUSABLE TYPE-AWARE PAGE GENERATOR. ONE function, ims_page, renders ANY real Nishi content into a fully WALKABLE, S-class typed wiki page -- replacing the per-page cloned emitters (nx_wiki_nist_stem_page-style copies). It reuses nx_wiki_shell VERBATIM for every piece of furniture (head, nav, the walk block = breadcrumb+tree+prev/next+related+backlinks, anchored sections, infobox, toc, footer) and reads the page's nav relationships from wiki_links.tsv BY SLUG, so a new page becomes part of the walkable tree the moment its wiki_links.tsv row exists. The Diataxis doc_type drives a small, DATA-DRIVEN layout difference read from knowledge/registry/ims_typemap.tsv (a type label + which optional sections show) -- no layout magic in code (CLAUDE.md #11). The caller supplies title + body_html (already valid, escaped HTML for the page's own content) + the corpus set used by the guarded publish step (the generator itself only WRITES the file). REUSE (zero furniture reinvented): nx_wiki_shell sh_head/sh_nav/sh_walk_furniture/ sh_section/sh_infobox_*/sh_toc_*/sh_footer_wl + sh_links_load/sh_corpus_store + sh_cat/sh_catn + NxWikiLinks. nx_syscalls for I/O. license_tier: ORIGINAL

dependencies 3 imports · 7 importers

nx_syscalls.nx nx_wiki_shell.nx nx_native_config.nx nx_ims_page.nx nx_asset_dashboard_lib.nx nx_figures_page.nx nx_ims_batch1.nx nx_ims_batch2.nx nx_ims_page_selftest.nx nx_math_render_page.nx nx_wiki_search_page.nx

imports: nx_syscalls.nxnx_wiki_shell.nxnx_native_config.nx

imported by: nx_asset_dashboard_lib.nxnx_figures_page.nxnx_ims_batch1.nxnx_ims_batch2.nxnx_ims_page_selftest.nxnx_math_render_page.nxnx_wiki_search_page.nx

structs

42struct NxTypeMap

consts

22const IP_OK: i64 = 0
23const IP_BAD_INPUT: i64 = 2820
24const IP_WRITE_FAIL: i64 = 2821
27const IP_CAP: i64 = 262144 // 256 KB per emitted page (>> any real page)
28const IP_MODE_0644: i64 = 0x1a4
29const IP_LINKS_PATH: *u8 = "knowledge/registry/wiki_links.tsv"
30const IP_TYPEMAP_PREFIX: *u8 = "knowledge/store/ims-typemap-"
31const IP_OUT_DIR: *u8 = "web_assets/"
38const IP_TM_MAXROWS: i64 = 16
39const IP_TM_MAXBYTES: i64 = 8192
40const IP_TM_NCOLS: i64 = 5

functions

49func ip_tm_field(tm: *NxTypeMap, row: i64, col: i64) -> *u8
59func ip_tm_flag(tm: *NxTypeMap, row: i64, col: i64) -> i64
called by 1: ip_render calls 1: ip_tm_field
66func ip_typemap_load(tm: *NxTypeMap, prefix: *u8) -> i64
99func ip_type_row(tm: *NxTypeMap, doc_type: *u8) -> i64
called by 1: ip_render calls 2: ip_tm_fieldsh_streq
115func ip_render(slug: *u8, doc_type: *u8, title: *u8, body_html: *u8,
183func ims_page(slug: *u8, doc_type: *u8, title: *u8, body_html: *u8) -> i64