It is working on local fine, but when i publish it on github it is not working.
<a class="navbar-brand" href="{{ '' | absolute_url }}">{{ site.title }}</a>
it gives us site url under local host, but on github it gives page url. my blog is omercece.com, you can check it out. I use latest version of jekyll
Thanks
absolute_url
combines site.url
and site.baseurl
with the path (the empty string in this case). Is it possible that url
is not set in _config.yml
? Setting url
is required for absolute_url
to work.
Note that the path should not be the empty string, but instead the root path: ‘/’ since you want a link to the root of your site.
Additionally, I think it is unnecessary to use absolute_url
, since relative_url
will work just fine (the browser will supply the rest of the URL). The absolute_url
filter is only needed in special cases, like displaying a human-readable absolute URL, etc.
I’m new on Jekyll, i’ve seen this "url-pretty: “omercece.com” in _config then though it is the right place. thanks.
1 Like