config.rb for SASS fonts directory path adding slash -
i have set config.rb file below
http_path = "/" css_dir = "" sass_dir = "sass" images_dir = "images" fonts_dir = 'fonts' fonts_path = "" javascripts_dir = "js" here directory path
in project root
style.css fonts/my-fonts sass/style.sass images/my-all-images
now when trying add fonts using font-face adding leading slash font directory /fonts want fonts
sass
+font-face("ubuntu", font-files("ubuntu/ubuntu-r-webfont.eot", "ubuntu/ubuntu-r-webfont.eot?#iefix", "ubuntu/ubuntu-r-webfont.woff", "ubuntu/ubuntu-r-webfont.ttf", "ubuntu/ubuntu-r-webfont.svg#ubunturegular")) generating css
@font-face { font-family: "ubuntu"; src: url('/fonts/ubuntu/ubuntu-r-webfont.eot') format('embedded-opentype'), url('/fonts/ubuntu/ubuntu-r-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/ubuntu/ubuntu-r-webfont.woff') format('woff'), url('/fonts/ubuntu/ubuntu-r-webfont.ttf') format('truetype'), url('/fonts/ubuntu/ubuntu-r-webfont.svg#ubunturegular') format('svg'); }
you can set relative_assets = true right after path setting in config file.
here sample config example work on relative assets.
# set root of project when deployed: http_path = "/" css_dir = "app/css" sass_dir = "app/css/sass" images_dir = "app/img" javascripts_dir = "app/js" fonts_dir = "app/css/fonts" output_style = :nested environment = :development relative_assets = true
Comments
Post a Comment