jacobobryant / biff

A Clojure web framework for solo developers.
https://biffweb.com
MIT License
829 stars 40 forks source link

Is it possible to keep assets files in modules? #191

Closed vldmr-k closed 4 months ago

vldmr-k commented 5 months ago

Hi, I'm interestin biff framework. After reading docs, I would like to use module system for my app to extend it, but I don't understant how to keep custom js,css or iamges file in modules.

Is it possible?

jacobobryant commented 5 months ago

Hi! For static assets, you don't need to expose them through the module system per se. You can put them somewhere under the resources/public/ directory, then you can reference those files from your routes. e.g. if you put a file at resources/public/images/hello.jpg, you could then include [:img {:src "/images/hello.jpg"}] in one of your routes.