-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to install fonts with bower #3
Comments
If it's just Font Awesome, I would avoid the Bower package altogether and use their CDN instead [http://fontawesome.io/get-started/#bootstrapcdn]. Let me know if that's somehow not possible/ideal in your situation and perhaps we can figure something else out. |
I'd like to keep it usable when being offline. I could probably add a folder for "unmanaged assets" within source, clone the font-awesome repo in there and import the font-files from there. Not ideal, but that way I can still pull changes easily when updating bower dependencies. I guess this problem is with every bower package which brings other assets than css and js (thinking of media like images/sprites, videos, etc). So it would be cool to have a solution within the template for that. Shooting in the dark here, but an idea is that you specifiy files that should be served and an relative path where they will be found. Example: project.yaml:
project.sass:
Not sure about leading and trailing slashes. Also not sure if this really makes sense. Maybe there is a sprockets-convention for cases like this? |
Thats a solid point ~ there's inevitably going to be non-css/js assets that will need to be brought into the mix. I think you might be on the right track, but I don't believe YAML files get brought in early enough in the compiling cycle to be able to reach outside of the source directory via sprockets. I think the proper solution would be similar, but might have to originate in the Middleman config file. I'll play around later tonight and see what if I can do. If you find a working solution yourself, feel free to submit a pull-request as well. |
for now i went with cloning the whole fa repo into my assets folder. read a lot of comments on recent pull requests of sprockets, rails, sprockets-sass, sprockets-helpers, asf. looks to me like there is no "final" solution yet. also found how to explicitly precompile files in sprockets/rails:
but do not get how to transfer to middleman config. |
Did you ever find an offline solution? I'm running into the same problem and wonder whether to clone it like you mentioned via a grunt task…or…to have a better solution :) |
i am trying to add font-awesome to my project. how would you recommend to enable the webfonts? i cannot reference them directly since they are in the bower directory, which is not served publicly.
The text was updated successfully, but these errors were encountered: