diff --git a/index.janet b/index.janet index c1d6a34..b827fbc 100644 --- a/index.janet +++ b/index.janet @@ -1,8 +1,23 @@ (import janet-html :as html) -(import path) +(import spork/netrepl) (import ./views) +# --- +# expose the a netrepl for conjure to connect to when running in repl mode +# --- + +(defn bag-repl? [cli-args] + (= ["bag" "--repl"] (slice cli-args 0 2))) + +(def conjure-repl + (when (bag-repl? (dyn :args)) + (thread/new (fn [_] (netrepl/server))))) + +# --- +# site config +# --- + (bagatto/set-output-dir! "site") (def data {:config {:attrs {:title "arnes.space"}}