Skip to main content

render

Function render 

Source
pub fn render(app: &Command, version: &str, date: &str) -> String
Expand description

Renders the full ssg.1 man page.

version and date are passed in rather than read from the environment so the output is a pure function of its inputs — the determinism gate compares builds across machines, and a page carrying today’s date would differ on every run.

§Examples

use ssg::cmd::{man, Cli};
let page = man::render(&Cli::subcommand_app(), "0.0.58", "2026-09-02");
assert!(page.starts_with(".TH "));
assert!(page.contains(".SH NAME"));