2

I'm attempting to set up a basic Jekyll site on github pages. The site in question currently is: https://kculmback.github.io/kcfeatures-v2/

Here is the repo: https://github.com/kculmback/kcfeatures-v2

My problem is that the site is not loading images or the css files from my assets folder, even though the link seems to be correct (as far as I can tell).

Example link to image: kculmback.github.io/kcfeatures-v2/assets/img/Logo.svg (currently not working)

Here is the image in the repo: github.com/kculmback/kcfeatures-v2/blob/master/assets/img/Logo.svg

This is my first time setting up a Jekyll site but as far as I can tell from everything I've read I've done it all right...

Here is the siteurl/url settings from my _config.yml file:

# Serving
url:     "http://kculmback.github.io"
baseurl: "/kcfeatures-v2"

Here is an example of how I wrote the link to CSS file:

<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/app.css">

And here is the resulting link when rendered by Github Pages:

https://kculmback.github.io/kcfeatures-v2/assets/css/app.css

Any help would be greatly appreciated!

Kasey
  • 41
  • 6

1 Answers1

0

The problem is not the url, but what it is excluded in the _config.yml:

exclude:
  - "/assets/"

The above line tells Jekyll to exclude directories and files from the conversion.

So the website is being generated without the assets directory, while the urls are ok.

You have to remove assets from the exclude list and it works.

marcanuy
  • 23,118
  • 9
  • 64
  • 113