# Root level assets not loaded on Github Pages

**URL:** <https://talk.jekyllrb.com/t/root-level-assets-not-loaded-on-github-pages/3938>\
**Category:** Help\
**Created:** [February 18, 2020, 3:04am UTC](https://talk.jekyllrb.com/t/root-level-assets-not-loaded-on-github-pages/3938 "2020-02-18T03:04:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlienKevin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/alienkevin/32/2262_2.png) [@AlienKevin](https://talk.jekyllrb.com/u/AlienKevin)\
**Post date:** [February 18, 2020, 3:04am UTC](https://talk.jekyllrb.com/t/root-level-assets-not-loaded-on-github-pages/3938/1 "2020-02-18T03:04:09Z")

</div>

Hi, I’m building a simple blog based on the minima theme using Jekyll. It worked well locally but when I deployed it on Github Pages, root-level assets like `favicon.ico` etc. are not loaded. I also had to set the `baseurl` to `/` in `_config.yml` to make Github Pages load the stylesheet from `/assets/css/main.css` correctly. Any help would be appreciated. Thanks.

Here’s my current `_config.yml`:

```auto
title: AIwaffle
description: >- # this means to ignore newlines until "baseurl:"
  An AI learning platform for beginners.
baseurl: "/" # the subpath of your site, e.g. /blog
url: "https://aiwaffle.github.io/AIwaffle-blog" # the base hostname & protocol for your site, e.g. http://example.com
github_username: AIwaffle

# Build settings
markdown: kramdown
theme: minima
plugins:
  - jekyll-feed

```

Link to site: [https://aiwaffle.github.io/AIwaffle-blog/](https://aiwaffle.github.io/AIwaffle-blog/)  
Link to repo: [https://github.com/AIwaffle/AIwaffle-blog](https://github.com/AIwaffle/AIwaffle-blog)

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [February 18, 2020, 3:39am UTC](https://talk.jekyllrb.com/t/root-level-assets-not-loaded-on-github-pages/3938/2 "2020-02-18T03:39:34Z")

</div>

> [@AlienKevin](#):
>
> /AIwaffle-blog

that is most likely what your baseurl should be. If you just have / it is loading from whatever css your username repo is using which is probably the same it sounds like.

---

<div class="post-metadata">

**Author:** ![AlienKevin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/alienkevin/32/2262_2.png) [@AlienKevin](https://talk.jekyllrb.com/u/AlienKevin)\
**Post date:** [February 18, 2020, 3:47am UTC](https://talk.jekyllrb.com/t/root-level-assets-not-loaded-on-github-pages/3938/3 "2020-02-18T03:47:41Z")

</div>

`/AIwaffle-blog` doesn’t seem to be working either locally or on github pages.

> **[AIwaffle](https://aiwaffle.github.io/AIwaffle-blog/)**
>
> An AI learning platform for beginners.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [February 18, 2020, 4:12am UTC](https://talk.jekyllrb.com/t/root-level-assets-not-loaded-on-github-pages/3938/4 "2020-02-18T04:12:13Z")

</div>

I think it is - sort of.

The logo is not loading cause the path does not have the baseurl, try prepending relative url like the link does in your header include:

```auto
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">
      <img src="/assets/images/logo.svg" alt="AIwaffle logo" class="header-logo"/>

```

you need to do the same thing to all the icons, since you are using GH pages with a project, the root of the site is really a sub folder, your icon paths do not include the subfolder (baseurl) in the path so they are trying to load from the root of your username repo rather than the root of the project (sub folder in your username folder).

---

<div class="post-metadata">

**Author:** ![AlienKevin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/alienkevin/32/2262_2.png) [@AlienKevin](https://talk.jekyllrb.com/u/AlienKevin)\
**Post date:** [February 18, 2020, 11:34am UTC](https://talk.jekyllrb.com/t/root-level-assets-not-loaded-on-github-pages/3938/5 "2020-02-18T11:34:14Z")

</div>

Now it works. Thank you very much.
