jbossorg / themes

Awestruct-based microsite showcasing custom bootstrap themes including style (SASS) & layout (HAML) sources.
1 stars 4 forks source link

Images in the examples should use relative URL's #2

Open ge0ffrey opened 11 years ago

ge0ffrey commented 11 years ago

Absolute url's such as in themes/community/index.html.haml are problematic:

%img(src="#{site.jborg_images_url}/community/homespot_1.png" alt="Slideshow Image")

They are problematic because testing the site locally might not prove that it works remote too. If http://localhost:4242 ends up being used in the generated html, everything looks fine locally, but the images disappear when being deployed.

Also knowing the path of remote deployment in advance is problematic.

It would be nicer if we can do: %img(src="./community/homespot_1.png" alt="Slideshow Image")

unibrew commented 11 years ago

We define three environments local, staging and production, as you can see in https://github.com/jbossorg/themes/blob/master/_config/site.yml lines 50-71. So, your issue would be caught on staging anyway as it uses remote url. Additionally, those urls are for images and other design stuff created by our team and these resources will be available once it's released. You shouldn't need to serve those files from relative URL, nor should you do this because this content is copyrighted and we prefer it to stay only in our repositories.