Closed svanimisetti closed 7 years ago
Hi, I see the problem, it is also happening on the auto generated GitHub page of this blog template. I think GitHub is using a new Jekyll version that works differently as before. I will investigate and fix it.
I created a bug report at Jekyll: https://github.com/jekyll/jekyll/issues/5908
The problem is with the way you are building URLs.
The problem went unnoticed before jekyll/github-metadata#76 because your baseurl
is empty, but now that it is being set automatically the links are broken.
site.github.url
apparently contains the full URL to the site, and you do not need to use baseurl
at all if this is how you'd like to build URLs.
If you want to use site.url
instead, you will have to flip your prepend statements.
If baseurl
is /jekyllDecent
and site.url
is http://jwillmer.github.io
(and this is what they are when GitHub builds the site):
{{ "/css/screen.css" | prepend: site.url }}
will give us http://jwillmer.github.io/css/screen.css
If we try to prepend the baseurl to that ({{ "/css/screen.css" | prepend: site.url | prepend: site.baseurl }}
), we end up with /jekyllDecenthttp://jwillmer.github.io/css/screen.css
. A browser will resolve this URL as http://jwillmer.github.io/jekyllDecenthttp://jwillmer.github.io/css/screen.css
I would suggest using the absolute_url
filter instead, as it takes care of this complexity for you.
Thank you for your help and detailed error description @pathawks. I commited the changes and it looks like all references are fixed now.
Now it finally works as intended and I also used this bug to refactore some url patterns.
I tried forking the base repo and changing the project setting to serve GitHub pages from master branch. I updated the 'url' variable in _config.yml file. The 'baseurl' variable is empty. I can see the site firing up - but the URLs are all doubled-up. When I browse to the main site, I see the same behavior. Is this a problem with my browser? I am using Google Chrome Version 56.0.2924.87 (64-bit).