Site.github.url


#1

Is site.github.url no longer the preferred method used to prepend to sources paths when hosting on github pages? Do we use the relative_url filter instead?


#2

:bulb: Jekyll’s website is hosted on GitHub Pages and does not use site.github.url.

Defining url in your config and using relative or absolute filters should work just fine.
And as in development environment url defaults to localhost:4000, you shouldn’t have to worry.

site.github.url is related to jekyll-github-metadata, this plugin is mostly useful if you need to access other metadata.


#3

Isn’t the plug-in you mentioned automatically available in github? Have use site.github.url for a while in some projects with success. I thought I had seen this explained in the official docs site jekyllrb.com but now I can’t find it and believe it was replaced with the relative_url filter information. Am I imagining things or was it there in the past?


#4

It might have been mentioned in Ben Balter’s Jekyll Style Guide before the url filters.

Now it recommends to use the filters instead: