我对SASS开发Wordpress网站特别陌生。当我需要使用config.rb以下设置创建http://路径时出现问题:
http_path = "/"
css_dir = '/'
sass_dir = '_/components/sass'
javascripts_dir = '_/js'
images_dir = 'http://localhost:8888/acdbox/wp-content/uploads/2015/03/'
fonts_dir = '_/fonts'
output_style = :extended
relative_assets = true
disable_warnings = true
输出为:
background: url('http:/localhost:8888/acdbox/wp-content/uploads/2015/03/home-order-bg2.png')
缺少http双斜杠(http://)并仅显示为(http:/)单斜杠。我做错了吗?请帮忙。
答案 0 :(得分:0)
知道了。我不确定这是否是正确的方法,但它有效。通过将http_images_path设置为图像精确放置的位置,将relative_assets设置为false
http_path = "/"
http_images_path = "http://localhost:8888/acdbox/wp-content/uploads/2015/03/"
css_dir = '/'
sass_dir = '_/components/sass'
javascripts_dir = '_/js'
images_dir = ''
fonts_dir = '_/fonts'
output_style = :expanded
relative_assets = false
disable_warnings = true
这是正确的做法吗?有没有更好的方法呢?