{ depot, lib, pkgs, ... }: with depot.nix.yants; let inherit (builtins) hasAttr filter readFile; inherit (depot.web.blog) post includePost renderPost; inherit (depot.users) wpcarro; inherit (pkgs) runCommandNoCC; config = { name = "wpcarro's blog"; baseUrl = "https://blog.wpcarro.dev"; footer = ""; }; posts = filter includePost (list post (import ./posts.nix)); rendered = runCommandNoCC "wpcarros-blog" {} '' mkdir -p $out ${lib.concatStringsSep "\n" (map (post: "cp ${renderPost config post} $out/${post.key}.html" ) posts)} ''; formatDate = date: readFile (runCommandNoCC "date" {} '' date --date='@${toString date}' '+%B %e, %Y' > $out ''); postsList = pkgs.writeText "index.html" ''
Personal blog by wpcarro.
> Half-baked musings lossily encoded.
> - misc reviewer
${formatDate post.date}