Compare commits

...

2 commits

Author SHA1 Message Date
noe
9d17b10a24 brewTea: staticAssets might need to be a string 2025-05-14 19:22:19 -07:00
noe
36b4dda14a brewTea: add staticAssets 2025-05-14 19:04:23 -07:00
4 changed files with 11 additions and 1 deletions

View file

@ -8,6 +8,10 @@
# maybe don't do this but its possible to reference _any file_.
defaultLayout = ./layouts/default.html;
# this could technically be a raw path; but nix doesn't keep directory name the same.
# use best judgement.
staticAssets = [ "./static" ];
markdollPlugins = let
sPoNgEbOb = pkgs.buildGoModule {
name = "sPoNgEbOb";

View file

@ -16,3 +16,5 @@ this is markdoll!
[img(https://codeberg.org/0x57e11a/markdoll/raw/branch/main/button.png)::
alt text goes here (88x31 button that says MADE WITH MARKDOLL)
]
[img(/static/noe-pat.gif):noe being patted]

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -13,6 +13,7 @@
# otherwise set by frontmatter
defaultLayout ? "default.html",
staticAssets ? [],
allowFailedRenders ? true,
}: let
markdoll = "${markdollParser}/bin/markdoll";
@ -118,6 +119,9 @@ in pkgs.stdenvNoCC.mkDerivation {
render_final $file $outFile $outFile.tmp.render
done
echo ">>> STATIC ASSETS"
${pkgs.lib.concatStrings (map (path: "cp -rv ${path} dist/\n") staticAssets)}
'';
installPhase = ''