Question

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' %>
Was it helpful?

Solution

Add activate :relative_assets to your config.rb.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top