GitHub CSS link config

Hi there - apologies, this is my first day using Jekyll and after a weird day of fighting against different versions of Ruby I just want to ask a super basic question that I’m sure will be embarrassingly obvious soon.

How do I set where my Jekyll site, deployed as a GitHub Page, is looking for its assets? Right now it’s relative link isn’t taking in the full URL and I’m unsure of how to set it correctly. I’m sure it’s somewhere in the config.yml but I’d really appreciate some guidance. This is literally a boilerplate Jekyll page with no adjustments after the jekyll new site command.

CSS link in the HTML: /assets/main.css
…which renders: https://jacksorjacksor.github.io/assets/main.css
…instead of the needed: https://jacksorjacksor.github.io/jekyll-test-2.github.io/assets/main.css

Thank you and please take pity on a VERY tired CS student - apologies in advance as I’m sure this has been answered a large number of times.

Rich

AH I think I’ve got it - in _config.yml you set the baseurl and url

For site:

https://jacksorjacksor.github.io/jekyll-test-2/

…add these to _config.yml

url: https://jacksorjacksor.github.io
baseurl: /jekyll-test-2

(if anyone could let me know if there was a better way then please do!)

Rich

I think you did solve your own problem, yes :slight_smile:

Here is the first video (that will autoplay in a playlist) of a few videos I created that you might find useful:

It sounds like you got the Ruby versions sorted out, but just in case that causes you trouble down the line, here is my latest video on installing Ruby (works with most versions of the Mac, not just M1). If you are on a different OS, then this is not pertinent to you:

1 Like

Thanks Bill, much obliged!

1 Like