mmistakes / jekyll-theme-skinny-bones

A Jekyll starter with a variety of flexible layouts and components.
https://mmistakes.github.io/jekyll-theme-skinny-bones
MIT License
802 stars 907 forks source link

Site not building on GitHub pages #67

Closed jengalas closed 8 years ago

jengalas commented 8 years ago

I'm very new to Jekyll but have everything set up and working locally on my Windows machine. However, when I try to push to my GitHub user site, I'm getting a 404 page and an email that there was a generic build error. Should this theme work with the user sites or just the project sites? Is there something I might need to change in the config? My email address is verified, and I didn't see anything else on the GitHub troubleshooting page that seemed relevant. Can you help? Thanks very much!

mmistakes commented 8 years ago

It should work with both. Probably best to reach out to GitHub Pages support. If it's working locally then my guess is something might not be setup correctly for GitHub.

If your using a user account have you named the repo correctly. I've only used to project based GH pages site using the gh-pages branch so I probably won't be of much help 😕

Is your repo public? I might be able to spot something if I can see the source.

jengalas commented 8 years ago

I named the repo jengalas.github.io based on documentation I found. I think that should be correct.

I was wondering about the url field in _config.yml. I have tried both localhost:4000 and the url of the repo but neither one worked. (I am using localhost on my machine successfully). The repo is public. Thanks for your quick response!

mmistakes commented 8 years ago

That seems right to me. As far as url in _config.yml. When working locally you use http://localhost:4000 or leave it blank and when pushing to GitHub use your repo name. If you use the wrong one that won't really break anything except the page links and CSS.

At the very least it should be building the pages which it doesn't seem to be doing. The GitHub Pages gem recently updated so it's possible something broke. I'm not at a computer to test.

What you could try is using that gem instead of the Jekyll one locally. See if that gives you any errors then you know that's the problem and not your content. To do this:

Replace Gemfile with the following:

source "https://rubygems.org"

gem "github-pages"

Run bundle update

Then run Jekyll with bundle exec jekyll build Or bundle exec jekyll serve

jengalas commented 8 years ago

Thank you! I will try this as soon as possible, probably Thursday.

jengalas commented 8 years ago

The problem is in one of my posts. Now I'm trying to figure out just what the problem is.

mmistakes commented 8 years ago

I just tried swapping the Jekyll gem with the GitHub Pages one as described here, and got the following errors.

      Generating...
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configu
ration, or set up an 'origin' git remote pointing to your github.com repository.

As far as I can tell this isn't a theme issue. Either it's with your content as you mentioned or it has something to do with how you have your repo's remote setup. I'd suggest reaching out to GitHub support if it turns out your content is ok.

mmistakes commented 8 years ago

Also to help track down what post/page is giving you problems run Jekyll with trace and in verbose mode.

bundle exec jekyll build --trace --verbose

Usually you can tell what piece of content it's choking on as it generally falls before the error. Another tip is to move all your posts out of _post, build, verify it works ok, move back a few posts, build, verify, move more posts over, build, verify, etc etc. This will help you pinpoint which file is giving you problems so you can take a closer look at it.

jengalas commented 8 years ago

Thanks for the tip on verbose mode! Didn't know about that.

After checking everything against your working version and finding no major differences in the config, I did indeed move my posts out of _posts and swap them back in until I found the problem. It is a post that uses fenced code blocks. The three backticks work fine, but as soon as I add the modifier apache for syntax highlighting, the site won't build on GitHub. I'll have to track down what's going on there, but now at least I know where the problem lies.

mmistakes commented 8 years ago

Glad you found the culprit.

As far as syntax highlighting you could try using the Jekyll highlighting tag instead of the three backticks. It's not as nice as far as a pure MarkDown approach but it might help with whatever is going on with the apache modifier.

{% highlight apache %}
your code here
{% endhighlight %}
jengalas commented 8 years ago

Thanks for the tip and for your amazing work and support!