nx_wiki_search_render.nx
buildroot/runtime/wiki/nx_wiki_search_render.nx
about
nx_wiki_search_render.nx -- WIKI-SPECIFIC THIN ADAPTER.
All actual render logic lives in hub/nx_search_render_html.nx
(HUB primitive; site-agnostic; reusable across wiki, obd-config,
sprinkler-config, future Nishi-hosted third-party sites).
This file ONLY:
1. Builds the wiki-themed NxSearchRenderTheme constant
2. Adapts NxWikiDocCtx -> raw byte writer for hub render
3. Delegates to nx_search_render_html
Per operator cardinal 2026-05-27: "make sure you make the onsite and
offsite search reusable and not just tied to the wiki but with
capabilities to be used on other sites" -- enforced structurally by
moving render logic to hub/, keeping per-site files THIN.
COMPOSES:
hub/nx_search_render_html (all logic; this file is glue)
wiki/nx_wiki_doc_render (NxWikiDocCtx writer cursor)
COMPOSED BY:
wiki/nx_wiki_search_wiring (next commit)
dependencies 5 imports · 1 importers
imports: nx_syscalls.nxnx_search_render_html.nxnx_wiki_doc_render.nxnx_search_query_parser.nxnx_search_onsite_engine.nx
imported by: nx_wiki_search_wiring.nx
structs
| none |
consts
| 31 | const NX_WIKI_THEME_CONTAINER: *u8 = "wiki-search-results" as *u8 |
| 32 | const NX_WIKI_THEME_CONTAINER_N: i64 = 19 |
| 33 | const NX_WIKI_THEME_BANNER: *u8 = "wiki-search-banner" as *u8 |
| 34 | const NX_WIKI_THEME_BANNER_N: i64 = 18 |
| 35 | const NX_WIKI_THEME_RESULT: *u8 = "wiki-search-result" as *u8 |
| 36 | const NX_WIKI_THEME_RESULT_N: i64 = 18 |
| 37 | const NX_WIKI_THEME_META: *u8 = "wiki-search-meta" as *u8 |
| 38 | const NX_WIKI_THEME_META_N: i64 = 16 |
| 39 | const NX_WIKI_THEME_SNIPPET: *u8 = "wiki-search-snippet" as *u8 |
| 40 | const NX_WIKI_THEME_SNIPPET_N: i64 = 19 |
| 41 | const NX_WIKI_THEME_EMPTY: *u8 = "wiki-search-empty" as *u8 |
| 42 | const NX_WIKI_THEME_EMPTY_N: i64 = 17 |
| 47 | const NX_WSR_OK: i64 = 0 |
| 48 | const NX_WSR_BAD_INPUT: i64 = 2000 |
| 49 | const NX_WSR_CTX_INVALID: i64 = 2001 |
functions
| 56 | func nx_wiki_search_theme_init(t: *NxSearchRenderTheme) -> i64 |
| 71 | func nx_wiki_search_render(ctx: *NxWikiDocCtx, |