Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

site.baseurl should be used #18

Open
shellscape opened this issue Aug 23, 2016 · 0 comments
Open

site.baseurl should be used #18

shellscape opened this issue Aug 23, 2016 · 0 comments

Comments

@shellscape
Copy link

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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant