문제

Somehow my middleman build creates

<link href="/css/all.css" rel="stylesheet" type="text/css" />
<script src="/js/all.js" type="text/javascript"></script>

(note the slash at the beginning of the links) while

<link href="css/all.css" rel="stylesheet" type="text/css" />
<script src="js/all.js" type="text/javascript"></script>

would be correct.

How can I change that?

I use pretty much the standard build settings:

configure :build do
  activate :minify_css
  activate :minify_javascript
end

and the template sections looks like this:

<%= stylesheet_link_tag 'all' %>
<%= javascript_include_tag 'all' %>
도움이 되었습니까?

해결책

Add activate :relative_assets to your config.rb.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top