Halve icon indicating copy to clipboard operation
Halve copied to clipboard

site.baseurl should be used

Open shellscape opened this issue 9 years ago • 0 comments

It would seem that site.url is being slightly misused. Ideally, that variable is only used for permalinks and things like RSS feed urls in the <head> element. site.baseurl should be used for asset locations, etc. This will allow local serving to mirror production serving without having to modify hosts or implement custom routing. For example:

<a href="{{ site.url }}" class="logo"><img src="{{ site.url }}/images/{{ site.logo }}"></a>

should be

<a href="{{ site.baseurl }}" class="logo"><img src="{{ site.url }}/images/{{ site.logo }}"></a>

shellscape avatar Aug 23 '16 13:08 shellscape