Full urls for image tag and links

I am working on a site that I deploy to github pages and I would like to avoid urls that look like ../../../ and instead use a full path like http://site.com/image/

Is this possible?

I have tried setting set :relative_links, false in my config.rb?

Thoughts?

You should check relative_links and relative_assets in your config (the latter for image urls and other asset urls), but both are set to false by default and this should give you the absolute urls, but without a hostname. If you want the full URL with domain-name, then I don’t have a ready answer. There is not documented :asset_host feature in Middleman, that partially solves your problem.

my question is why do you care if the URL for assets & links are relative or absolute in your markup?

I was having issues with instantclick js, which I was using to speed up load times. Since I posted this, I decided to pull the plug on using that all together, so I did not need the full host in the url, but I did not want relative asset links.

If anyone else finds this post, you have to make sure to comment or remote activate :relative_assets from your config.rb.

Thank you for your help everyone.

configure :build do
  activate :minify_css
  activate :minify_javascript
  activate :minify_html
  activate :asset_hash
  # activate :relative_assets
  activate :gzip
  activate :imageoptim do |image_optim|
    image_optim.pngout_options = false # Should disable pngout
  end
end

It is important for instance in the use of Social sharing - Facebook / Twitter require the full path in the meta tags for lookup.