Vendored asset paths


#1

I’m trying to use the Argon Bootstrap theme across 2 apps in my first Hanami project. I’m having a hard time figuring out where to put the files though, such that both apps can find them. Seems like adding ../../lib/assets to the Hanami::Assets.sources in each app’s application.rb file doesn’t quite do it. I also tried creating a gem that was vendored in lib/ but that didn’t work either.

You can see in the quickstart that I have to require assets in a certain order. One option would be to mash them all into a single file based on type myself, but I feel like Hanami should let me do what I’m trying to do. I must be missing something.

Thanks for your help!


#2

So I ended up putting the argon assets in apps/web/vendor/argon/ and now they are being precompiled into public/assets/auth/ when I hit the login page, so this is good!

However, the font-awesome icons aren’t loading because the paths are incorrect. font-awesome.min.css is looking for ../fonts/fontawesome-webfont.eot but that’s not getting pulled into public/. Maybe I can put it there…


#3

I feel like I’m talking to myself, but I want to share the info…

I was able to get the fonts to work by manually moving them to public/fonts/.