#import "./html_head.typ": html_head #import "./html_body.typ": html_body #import "./html_utils.typ": html_show /// Mail template function #let webpage( /// Page url url, /// Page logo, also used for icon, so it *needs* to be path (TODO: fix when typst support multi-file out) logo, /// Alt-text for the log logo-alt, /// Title of the page, default to document.title title: none, /// Page header header: [], /// Use only for html 'lang' attribute. lang: "en", //--
only args -- /// Type of the page for open-graph data og-type: "website", /// Name of the site for metadata of the page site-name: none, /// Description of the site for metadata #TODO default to document.description description: none, /// Author of the site for metadata #TODO default to document.author author: none, /// Additional stylesheet for the page: must be a list of url stylesheets: (), /// List of related sites for metadata me-links: (), //-- Body -- /// Body of the page body ) = { show: html_show if title == none { title = context document.title } html.html(lang: lang, { html_head( url, title, logo, og-type: og-type, site-name: site-name, description: description, author: author, stylesheets: stylesheets, me-links: me-links ) html_body( logo, logo-alt, header: header, body ) }) }