Everything's working fine when tested in localhost but after publishing to GitHub Pages, I noticed an annoying bug: clicking website's logo will always redirect to the page's link instead of the homepage (baseurl).
My code:
<div class="logo-mobile">
<a href="{{ site.baseurl }}"><img alt="{{ site.title }}" src="{{ site.logo.mobile | relative_url }}" /></a>
</div>
For example, if I'm viewing 'About Us' at www.example.com. The website logo will link to 'www.example.com/aboutus' instead of 'www.example.com'.
My github page does have a custom apex domain and www subdomain setup with https enforced. The DNS is correctly setup as per github's guide and all the links including the menu buttons work except the logo.
Localhost does not have this issue and will always link correctly back to homepage. I can't debug it so far.