GitHub page build fails (jekyll, theme: minima, gh-pages branch)

Hello GitHub community,

I’m having trouble publishing a site using GitHub pages and none of the forum articles seemed to provide a solution, so far. I’m a beginner, so my apologies, if this is a duplicate.

The source for my page is the gh-pages branch of my repository: 

https://github.com/NicoleEic/Brain_and_Code/tree/gh-pages

I have changed the settings to use the gh-pages branch to build the site (-> Your site is published at https://nicoleeic.github.io/Brain_and_Code/)

However, when I navigate to the URL shown above, I can only access the ‘home’ site, which looks like something was wrong with the layout. Also, the link to the individual posts gives me a 404 error.

I suspect that the problem has something to do with the theme and layout. I’m using the ‘minima’ theme, so I have the following line in my Gemfile: 

gem "minima"

and in my _config.yml file:

theme: minima

I don’t have a _layouts subfolder, because I understood that this is not needed, when I use the default themes.

The local build of the page on my computer works fine: 

Brain_and_Code(gh-pages)
==>$ git pull
Already up to date.

Brain_and_Code(gh-pages)
==>$ bundle exec jekyll serve
Configuration file: /xxx/Brain_and_Code/_config.yml
            Source: /xxx/Brain_and_Code
       Destination: /xxx/Brain_and_Code/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.791 seconds.
 Auto-regeneration: enabled for '/xxx/Brain_and_Code'
    Server address: http://xxx.x.x.x:4000/
  Server running... press ctrl-c to stop.

Any comments on what I might be doing wrong would be greatly appreciated!
Would any additional information from my side be useful to pin down the problem?

Thanks,

Nicole

Seems to be working fine for me.

Thanks for looking into this!

Actually, with the help of alvinsight I found the problem, which were relative URLs.

The ‘baseurl’ in the _config.yml file was not defined.

I have changed it to:

baseurl: "Brain_and_Code"

and updated all relative paths to images, etc. and everything looks fine now.

1 Like