11
votes

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.

4
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
Real repo url is better for debug.David Jacquel
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
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
Did you manage to solve this? I'm having the exact same problem and have ran out of optionsFrancisca Concha-Ramírez

4 Answers

6
votes

My mistake was to make in _config:

baseurl: ""

When I REMOVED it, all started working fine!

3
votes

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

2
votes

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
2
votes

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