From a4faf2f38c06d238874fb88e2fca1bcad9a05c72 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 22 Apr 2025 21:11:48 -0700 Subject: [PATCH] error handling!! --- examples/quickstart/default.nix | 22 ++++++++++++++++++---- examples/quickstart/layouts/alt.html | 1 + examples/quickstart/layouts/default.html | 1 + examples/quickstart/pluginTests.doll | 22 ++++++++++++++++++---- examples/quickstart/plugins/plural.sh | 2 +- pkgs/brewTea.nix | 18 ++++++++++++++---- 6 files changed, 53 insertions(+), 13 deletions(-) diff --git a/examples/quickstart/default.nix b/examples/quickstart/default.nix index c5bda29..67d7a02 100644 --- a/examples/quickstart/default.nix +++ b/examples/quickstart/default.nix @@ -8,11 +8,25 @@ # maybe don't do this but its possible to reference _any file_. defaultLayout = ./layouts/default.html; - # these are mostly for alias purposes... - # can do an [invoke(plural)(...):yay!] type thing - # one can invoke stuff inline too without doing this. - markdollPlugins = [ + markdollPlugins = let + sPoNgEbOb = pkgs.buildGoModule { + name = "sPoNgEbOb"; + vendorHash = null; + src = pkgs.fetchFromGitHub { + repo = "sPoNgEbOb"; + owner = "yzguy"; + rev = "9e4bf8e86d5fd7870000832ff571acf13b6941eb"; + hash = "sha256-MWVtW9gzYmx3sOSvPh9NI4h6MotuO1ZQyzC09jpsHJI="; + }; + + preBuild = '' + go mod init github.com/yzguy/sPoNgEbOb + ''; + } + "/bin/sPoNgEbOb"; + in [ + # all of these add invoke handlers like [invoke(plural)(argv1):stdin] (mkMarkdollPlugin "plural" ./plugins/plural.sh) ((mkMarkdollPlugin "tools" ./plugins/tools.py).override { buildInputs = [ pkgs.python3 ]; }) + (mkMarkdollPlugin "sPoNgEbOb" sPoNgEbOb) ]; } \ No newline at end of file diff --git a/examples/quickstart/layouts/alt.html b/examples/quickstart/layouts/alt.html index 28aa3db..bb7ca2d 100644 --- a/examples/quickstart/layouts/alt.html +++ b/examples/quickstart/layouts/alt.html @@ -1,6 +1,7 @@ + %%TITLE%% | alt layout %%HEAD%%