{ depot, pkgs, ... }: { # content of the tag title # main part of the page, usually wrapped with <main> , content # optional extra html to inject into <head> , extraHead ? null # whether to use global URLs instead of absolute paths , useUrls ? false }@args: let inherit (pkgs) runCommandNoCC lib; inherit (depot.tools) cheddar; baseUrl = lib.optionalString useUrls "https://tvl.fyi"; in runCommandNoCC "index.html" { headerPart = '' <!DOCTYPE html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="The Virus Lounge"> <link rel="stylesheet" type="text/css" href="${baseUrl}/static/tazjin.css" media="all"> <link rel="icon" type="image/webp" href="${baseUrl}/static/favicon.webp"> <title>${title} '' + lib.optionalString (args ? extraHead) extraHead + ''

${title}


''; inherit content; footerPart = ''
''; passAsFile = [ "headerPart" "content" "footerPart" ]; } '' ${cheddar}/bin/cheddar --about-filter content.md < $contentPath > rendered.html cat $headerPartPath rendered.html $footerPartPath > $out ''