# Problem with shadow-cljs and github pages

**URL:** https://clojureverse.org/t/problem-with-shadow-cljs-and-github-pages/6285
**Category:** Troubleshooting
**Created:** [July 24, 2020, 6:57pm UTC](https://clojureverse.org/t/problem-with-shadow-cljs-and-github-pages/6285 "2020-07-24T18:57:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vipenzo](https://clojureverse.org/user_avatar/clojureverse.org/vipenzo/32/1042_2.png) [@vipenzo](https://clojureverse.org/u/vipenzo)
#### Post date: [July 24, 2020, 6:57pm UTC](https://clojureverse.org/t/problem-with-shadow-cljs-and-github-pages/6285/1 "2020-07-24T18:57:43Z")

</div>

Hi all,  
I’m having problems making a project built with shadow-cljs work with github pages.  
I put this project on github: [https://github.com/vipenzo/faber](https://github.com/vipenzo/faber). 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 “[https://vipenzo.github.io/faber/](https://vipenzo.github.io/faber/)”.  
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 [https://vipenzo.github.io/faber/](https://vipenzo.github.io/faber/) but the real root seems to be “[https://vipenzo.github.io/](https://vipenzo.github.io/)”.  
So, for example, if in my index.html file I write “” the server tries to load it from “[https://vipenzo.github.io/css/codemirror.css](https://vipenzo.github.io/css/codemirror.css)” (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 “[https://vipenzo.github.io/js/bootstrap/index.transit.json](https://vipenzo.github.io/js/bootstrap/index.transit.json)” which should instead be “[https://vipenzo.github.io/faber/js/bootstrap/index.transit.json](https://vipenzo.github.io/faber/js/bootstrap/index.transit.json)”, 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.

---

<div class="post-metadata">

### Author: ![thheller](https://clojureverse.org/user_avatar/clojureverse.org/thheller/32/534_2.png) [@thheller](https://clojureverse.org/u/thheller)
#### Post date: [July 24, 2020, 7:48pm UTC](https://clojureverse.org/t/problem-with-shadow-cljs-and-github-pages/6285/2 "2020-07-24T19:48:32Z")

</div>

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

See my the example code from my post.

- [https://code.thheller.com/blog/shadow-cljs/2017/10/14/bootstrap-support.html](https://code.thheller.com/blog/shadow-cljs/2017/10/14/bootstrap-support.html)

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

```

`:path` defaults to `/bootstrap` if not passed in.

---

<div class="post-metadata">

### Author: ![vipenzo](https://clojureverse.org/user_avatar/clojureverse.org/vipenzo/32/1042_2.png) [@vipenzo](https://clojureverse.org/u/vipenzo)
#### Post date: [July 25, 2020, 4:06pm UTC](https://clojureverse.org/t/problem-with-shadow-cljs-and-github-pages/6285/3 "2020-07-25T16:06:11Z")

</div>

It works !  
Thanks a lot.

---

<div class="post-metadata">

### Author: ![system](https://clojureverse.org/uploads/default/original/2X/5/51079bf9e4b7d9466242c06cf1e43b9f8bd6da14.png) [@system](https://clojureverse.org/u/system)
#### Post date: [January 24, 2021, 4:06am UTC](https://clojureverse.org/t/problem-with-shadow-cljs-and-github-pages/6285/4 "2021-01-24T04:06:13Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
