diff --git a/examples/quickstart/default.nix b/examples/quickstart/default.nix index f8052e4..2198ac0 100644 --- a/examples/quickstart/default.nix +++ b/examples/quickstart/default.nix @@ -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"; diff --git a/examples/quickstart/index.doll b/examples/quickstart/index.doll index 95ad0f4..4379f74 100644 --- a/examples/quickstart/index.doll +++ b/examples/quickstart/index.doll @@ -15,4 +15,6 @@ 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) - ] \ No newline at end of file + ] + + [img(/static/noe-pat.gif):noe being patted] \ No newline at end of file diff --git a/examples/quickstart/static/noe-pat.gif b/examples/quickstart/static/noe-pat.gif new file mode 100644 index 0000000..e5839c6 Binary files /dev/null and b/examples/quickstart/static/noe-pat.gif differ diff --git a/pkgs/brewTea.nix b/pkgs/brewTea.nix index ecaa8e9..c7e294a 100644 --- a/pkgs/brewTea.nix +++ b/pkgs/brewTea.nix @@ -120,9 +120,11 @@ 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 = '' cp -rv dist $out - '' + pkgs.lib.concatString (map path: "cp -rv ${path} $out/${path}; " staticAssets); + ''; } \ No newline at end of file