Problem with shadow-cljs and github pages

Hi all,
I’m having problems making a project built with shadow-cljs work with github pages.
I put this project on github: It’s a simple clojure editor that let you write clojure code to create 3d models that are, once compiled, visualized in a three.js pane.
It does work locally (just a minimal set of primitives for now), but I would like to make it work live using github pages. I configured the project for pages and it is available at the address “”.
The problem is the github pages server routing system that it is quite obscure to me: my web files (html, css, js) are all available from the prefix but the real root seems to be “”.
So, for example, if in my index.html file I write “” the server tries to load it from “” (faber is missing). I had to remove the “/” to load this file relative to the index.html position to make it work (so it is now ).
No big deal, so far, but I cannot make this kind of intervention on files loaded by shadow-cljs. For example one of the first files loaded is “” which should instead be “”, but I don’t know how to configure shadow-cljs to obtain this.
I tried with :asset-path “faber/js” but it seems to have no effect on the :bootstrap target.

I’m probably just using a wrong approach for this, if someone can offer some help I would really appreciate.

You can pass the path to use to the boot/init call.

See my the example code from my post.

(defn start []
  (boot/init compile-state-ref
    {:path "/bootstrap"}

:path defaults to /bootstrap if not passed in.

It works !
Thanks a lot.

1 Like