pub fn document_on(
title: &str,
root: &[(&str, String)],
head: Vec<El>,
body: El,
) -> StringExpand description
A whole page whose root element carries root’s attributes besides its language: the
theme contract, where a script written for the site reads it from <html> as the site’s
pages carry it.
use majordomus_cli::cockpit::html::{document_on, el};
let page = document_on("t", &[("data-theme-key", "a\"b".into())], vec![], el("body"));
assert!(page.contains("<html lang=\"en\" data-theme-key=\"a"b\">"), "{page}");