15

I've been struggling with this for a few hours now, to no avail. I'm trying to use one of the supported GitHub Pages themes (Cayman) in my docs site and I'm having a ton of trouble. The site looks great when I run it locally using bundle exec jekyll serve --safe (I read that GitHub uses the safe flag) but on GitHub it doesn't show any theme.

Gemfile:

source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

_config.yml:

title: myproject
baseurl: "/myproject"
url: ""
markdown: kramdown
theme: jekyll-theme-cayman
exclude: [vendor]

index.md:

---
layout: default
---
This is the home page of the myproject documentation.

The site appears fine when run locally, but the version on GitHub Pages (https://myusername.github.io/myproject) has no theme. Any ideas?

UPDATE:
It seems as though the site is not reloading the _config.yml. I changed multiple settings (such as the title) and still have not seen the changes reflected in the github page, but they are reflected locally. I have also disabled caching on that page, so it is not loading an old version. GitHub says it is rebuilding the site next to each commit, and changes to the markdown show up, just not the _config.yml.

lauren
  • 298
  • 1
  • 2
  • 8
  • 3
    Did you receive a build-success notification email from GitHub? If yes, then what errors do you see when you "inspect your GitHub site" with your browser's "developer tools"? – ashmaroli Jan 11 '18 at 07:20
  • Real repo url is better for debug. – David Jacquel Jan 11 '18 at 08:40
  • I did not receive any success email (as compared to the failure emails I received during development). No console errors upon inspection. As for the real repo, it is a corporate project so I cannot share it widely, sorry. – lauren Jan 11 '18 at 17:40
  • Update: it seems as though the site is not reloading the _config.yml. I changed multiple settings (such as the title) and still have not seen the changes reflected in the github page, but they are reflected locally. I have also disabled caching on that page, so it is not loading an old version. – lauren Jan 12 '18 at 18:49
  • 2
    Did you manage to solve this? I'm having the exact same problem and have ran out of options – Francisca Concha-Ramírez Jul 04 '18 at 14:08
  • I also have this problem and do not find what I am doing wrong – Dorian Grv Dec 23 '18 at 23:32

6 Answers6

16

My mistake was to make in _config:

baseurl: ""

When I REMOVED it, all started working fine!

Yshmarov
  • 3,450
  • 1
  • 22
  • 41
  • THATS IT.... I wonder why no one else mentions this..... Just `#baseurl: ""` and it will work.. Thank you ! – KaO Feb 11 '21 at 21:25
  • Happy that it helped you. You can see my complete jekyll blog setup here: https://github.com/yshmarov/yshmarov.github.io – Yshmarov Feb 11 '21 at 21:30
3

I recently suffered from the same problem. When I was deploying my Jekyll project on GitHub pages.

So when I visited my website hosted by GitHub pages, I found that my theme was missing and surprisingly I see some weird broken design.

Solution :
Here is what I have done, firstly I have opened the logs on my chrome. You can do that by just clicking inspect option. Where I found that my sass files are not found. When I found my link from where my site is searching for the files. The problem is here. Earlier my website used to be in the format as you mentioned https://myusername.github.io/myproject but now I simply hosted my project directly on my repo in this format https://myusername.github.io/ then it worked for me. It means I didn't create another repo using another name. Eventually, I did it directly on the repo - myusername.github.io

Please check this deployment using Github pages and you can easily solve the problem. And can deploy as you wish

Mehant Kammakomati
  • 852
  • 1
  • 8
  • 25
3

Edit your config .yml

  1. Make sure the base URL is following this format: baseurl: "/blogjekyll" # the subpath of your site, e.g. /blog

  2. Make sure URL is following this format: url: "https://berthaamelia.github.io" # the base hostname & protocol for your site, e.g. http://example.com

enter image description here

SHR
  • 7,940
  • 9
  • 38
  • 57
bertha
  • 113
  • 3
2

In my case I published my web page in /docs and I have to update the following fields in _config.yml

baseurl: "/pages/organization/WebPage" # the subpath of your site, e.g. /blog
url: "https://github.XXX.com" # the base hostname & protocol for your site, e.g. http://example.com
0

Use the About tab in the page of your github repo, and open up the workflow of the most recent jekyll page build. It shows the stdout, there will be a useful error message there.

J B
  • 348
  • 1
  • 6
0

Actually go to the actions tab and look at the pages build and deployment log. There you will see an error.

Chapin
  • 169
  • 1
  • 7