For some reason, I'm getting the following URLs in my Jekyll site:
| Code |
URL |
page.url | absolute_url |
https://github.com/pages/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/ |
site.url |
https://github.com |
'/assets/css/main.css' | relative_url |
/pages/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/assets/css/main.css |
There are several things that are puzzling me here:
- Why is
site.url set to https://github.com and not the configured GitHub Pages domain https://swedbankpay.github.io/? I get the same behaviour on sites with custom domain names as well; site.url is set to https://github.com regardless.
- Why isn't
site.url set to github.pages_hostname or an Octokit pages.html_url equivalent?
- Where is
/pages/ coming from and in which configurations of GitHub Pages or Jekyll does that base_url make any sense?
- These URLs seems to have been mangled as we went from relying on GitHub Pages to build our
.html files to us building them ourselves by manually invoking jekyll build. What do we have to do to make our custom Jekyll build work?
We could of course remove jekyll-github-metadata, but then we would loose github.public_repositories and other useful objects used to dynamically build parts of our Jekyll site. It would be better if we could just completely turn off jekyll-github-metadata's URL configuration, or at least somehow tweak it to give us the right values.
Right now I'm looking at jumping through quite a few hoops in order to set site.url to github.pages_hostname. Any pointers to how I can do that the simplest way possible would be highly appreciated.
For some reason, I'm getting the following URLs in my Jekyll site:
page.url | absolute_urlhttps://github.com/pages/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/site.urlhttps://github.com'/assets/css/main.css' | relative_url/pages/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/assets/css/main.cssThere are several things that are puzzling me here:
site.urlset tohttps://github.comand not the configured GitHub Pages domainhttps://swedbankpay.github.io/? I get the same behaviour on sites with custom domain names as well;site.urlis set tohttps://github.comregardless.site.urlset togithub.pages_hostnameor an Octokitpages.html_urlequivalent?/pages/coming from and in which configurations of GitHub Pages or Jekyll does thatbase_urlmake any sense?.htmlfiles to us building them ourselves by manually invokingjekyll build. What do we have to do to make our custom Jekyll build work?We could of course remove
jekyll-github-metadata, but then we would loosegithub.public_repositoriesand other useful objects used to dynamically build parts of our Jekyll site. It would be better if we could just completely turn offjekyll-github-metadata's URL configuration, or at least somehow tweak it to give us the right values.Right now I'm looking at jumping through quite a few hoops in order to set
site.urltogithub.pages_hostname. Any pointers to how I can do that the simplest way possible would be highly appreciated.