Advice needed - just finished jekyll/HTML5 UP work but not displaying OK when on external hosting


#1

Hello,

I just finished my jekyll/HTML5 UP presentation (for my own "business). Everything is fine on local development machine (OSX). I did “jekyll build” and then I tool everything from “_site” and placed it to my hosting via FTP.

Destination location is at http://www.4apes.cz/havlicek/

The problem is that so nice layout that is on development machine is gone once online.

Any suggestion what I need to configure in order to get working layout/theme once out from dev?

Thank you
Petr


#2

I guessing its the baseurl stuff for your css… Just wondering tho if you’ve tried pushing to a GitHub account at all…

That would give peep a chance to see your code and maybe look at where/what might be the problem.


#3

Hi Sparky,

Not tried to GitHub yet - as I pay for my personal hosting so I’d like to use it - but yes, will do once no other way. I’m guessing if the problem isn’t also linked with the fact that I didn’t placed “_site content” to the root of the hosting site - but cannot believe it as it shouldn’t be dependant…

Cheers
Petr


#4

My first suggestion would definitely be a git hub account tbh… I paid for all my hosting before Git hub with several Godaddy accounts…

Now I just pay annually for domain renewal using cname as my sites don’t need databases or php etc… tnx Git hub :slight_smile:

To help tho with this people really need to see some source code for your site - hence GitHub… give it a go, you’ll have a site up in ten mins after creating an account.


#5

if you are going to host in a sub folder rather than the root you need to use baseurl - your site is looking for the css in /assets/css/main.css when it is really at /havlicek/assets/css/main.css

In the config you should use baseurl: /havlicek and then prepend all your urls with {{site.baseurl}}. That or just manually prepend all your urls with /havlicek.


#6

YES, exactly I was thinking about this tweak - thank you. I tested the full site on root and everything is working as expected - except images - and I see “localhost” in generated html. So, not using correct path is the root cause. Actual semi-working solution is at havlicekpetr.cz.

Solved, great theme BTW, thanks to Jekyll integration: Andrew Banchich.


#7

if you see localhost anywhere in the production site it is probably because you used jekyll serve - you should use jekyll build when going to production. Serve will sometimes use localhost as it is trying to make your life easier for local dev.


#8

YES, exactly, thank you. I used serve and Today morning I just did a proper build - and voalá - everything is fine. Well, getting older means getting stupid - How is possible that ex-C++ and assembler programmer forgot a difference between compile and build :wink:


#9

@upman ProTip™: If you have a GitHub repo, I would definitively check out Netlify to host your static site for free (HTTPS included and many more extra features) : https://www.netlify.com/github-pages-vs-netlify/