0

I'm modifying a Jekyll theme called H2O locally on my Windows 10 PC. It is a blog theme that I will be hosting on Github Pages on a repo called blog. I'm aware there is a common problem using relative links locally that may initially appear fine on your computer, but when you push your files up to your repo everything is essentially broken due to baseurl and linking issues as properly addressed on this commented jekyll issue.

Although I have made some of the necessary changes; more specifically prepending {{ site.baseurl }} before my hyperlinked stylesheet files on my head.html, post-head.html, and default.html files, I'm still experiencing issues.

Issues: (Please visit my current blog url to see live examples.)

  1. There is supposed to be an "H2O" logo in the top left-hand corner on the main page. This logo doesn't appear at all on the main page. The post pages show the logo momentarily, but when scrolling down, the default CSS effect does not work correctly. (Please see the theme author's live demo for the correct example of how everything should look and function.
  2. The tags page loads correctly, but when you try clicking on the posts displayed at the bottom, they do not load correctly since the blog/ directory is omitted from the URL.
  3. When viewing any blog post page example, my avatar photo at the bottom does not appear. This is odd since my avatar correctly displays on the main page of the url: http://www.joshuagalan.com/blog/
  4. My favicon does not load correctly at all.

It may be worth mentioning that my website is being hosted on Github with the original name of muygalan.github.io with a custom doman name of www.joshuagalan.com.

P.S. The website Configuring Jekyll for User and Project GitHub Pages covers this topic in-depth, but I'm unable to use the grep searches the author provided under the Checking your site for link correctness section, since I believe they are linux based and I'm using a Windows computer.

MuyGalan
  • 61
  • 1
  • 2
  • 10
  • @ashmaroli answered my question. The only thing pending is why my favicon.ico wont load, but I will continue digging... – MuyGalan Feb 14 '18 at 11:38

1 Answers1

3

I went through your site and noticed the following. Editing them should resolve your errors:

  • In your config file, you have url: 'muygalan.github.io/blog' and baseurl: /blog. You should not be having /blog in your url:.
  • In assets/js/index.min.js there's a line r.css({background:"url(/assets/icons/logo_"+i+".svg) no-repeat center","background-size":"100% 100%"}).. See how the url doesn't contain /blog..?

Other pointers:

  • Strings in YAML files do not need to be quoted. See how baseurl: /blog is just fine..
  • Dont prepend urls with {{ site.baseurl }}.. use relative_url filter instead.
    {{ 'foo' | relative_url }}
ashmaroli
  • 5,209
  • 2
  • 14
  • 25