Closed jmif closed 9 years ago
Yes you can override the glypicons url in bootstrap_and_overrides.less
. The asset digest is handled in Rails 4 by config/initializers/assets.rb
, or in Rails 3 in config/application.rb
What variable should be set for this? Looking through the code I don't see any reference to a glyphicons path other than the standard bootstrap ones, which do not support rails asset names. Thanks Todd!
The gem provides a helper that would handle setting a hashed URL which is generated via Rails. You shouldn't need to set the URL as it is set here by bootstrap.
You can copy this and override it to your liking, but you'd likely want to process bootstrap_and_overrides.less
through ERB to pick up the asset URL. You would end up with something like:
bootstrap_and_overrides.less.erb
:
@font-face {
font-family: 'Glyphicons Halflings';
src: url("<%= asset_path('glyphicons-halflings-regular.eot') %>");
src: url("<%= asset_path('glyphicons-halflings-regular.eot?#iefix') %>") format('embedded-opentype'),
url("<%= asset_path('glyphicons-halflings-regular.woff') %>") format('woff'),
url('<%= asset_path('glyphicons-halflings-regular.ttf') %>') format('truetype'),
url('<%= asset_path('glyphicons-halflings-regular.svg') %>#@{icon-font-svg-id}') format('svg');
}
Does railstrap have support for setting the GlyphIcon image asset url? Seems that mine aren't being requested with the digest appended and I can't seem to find where to configure it.