#!/usr/bin/env nu # Shared page chrome for projected static doc surfaces (ADRs, catalog, …). # One source of truth for the brand palette, dark/light theme, nav, and the # common structural CSS (.doc-* classes). Consumed by gen-adr-pages.nu and # gen-catalog-pages.nu so both outreach/web (static) and the SSR site share an # identical look and feel. export def esc [s: string] { $s | str replace --all '&' '&' | str replace --all '<' '<' | str replace --all '>' '>' | str replace --all '"' '"' } export def paras [text: string] { $text | split row "\n\n" | where {|b| ($b | str trim | is-not-empty) } | each {|b| $"
(esc ($b | str trim))
" } | str join "\n" } # A single