codeforamerica / git-jekyll-preview

Preview your Github-hosted websites before making them live.
http://jekit.codeforamerica.org
29 stars 17 forks source link

Repos w/out `master` branch confuse Jekit #1

Closed KathleenLD closed 10 years ago

KathleenLD commented 10 years ago

@migurski

When I enter the account and repo name into the URL I receive the following error:

Jekit Error

Couldn’t find sotm-website under osmus. Does it exist?

When I enter an existing branch after the repo name I still have some issues. When I entered the gh-pages branch I got at 502 error. After reloading I was able to see the page, but in Jekit it seemed broken. (Lots of stuff is justified left, where it should be centered, for example)

migurski commented 10 years ago

Okay, so a better error for missing master branches, maybe a status check for a gh-pages branch or similar alternative magic name? The justification thing, can you point to an example on the live site where this is happening?

KathleenLD commented 10 years ago

The SOTM-US website is a private repo. Do you have access to it?

On Sat, Jan 11, 2014 at 3:28 PM, migurski notifications@github.com wrote:

Okay, so a better error for missing master branches, maybe a status check for a gh-pages branch or similar alternative magic name? The justification thing, can you point to an example on the live site where this is happening?

— Reply to this email directly or view it on GitHubhttps://github.com/codeforamerica/git-jekyll-preview/issues/1#issuecomment-32106085 .

KathleenLD commented 10 years ago

You do, apparently.

https://jekit.codeforamerica.org/osmus/sotm-website/gh-pages/

This is currently a one-page site, so you should only be seeing the homepage, which you can compare w/ the live site.

migurski commented 10 years ago

I do, yeah. I guess it’s the same site as http://stateofthemap.us right?

KathleenLD commented 10 years ago

Yeah. It's almost like it's giving me the mobile view?

migurski commented 10 years ago

The two (1, 2) look identical to me—what am I missing? Safari 7.0 on Mac.

KathleenLD commented 10 years ago

state of the map us 2014- washington dc

This is what I'm seeing on Ubuntu in both Chrome and FF

KathleenLD commented 10 years ago

I'm not having this issue w/ openstreetmap.us. The only difference I'm seeing there is that some fonts are rendering differently.

migurski commented 10 years ago

That looks like missing CSS, but I am totally not seeing it.

Jekit uses referer headers to redirect requests like /style.css to an appropriate repo/branch location. Maybe there’s some kind of paranoid security setting in Ubuntu that squashes this. What happens if you click a link?

KathleenLD commented 10 years ago

Agreed that it's missing CSS, but not sure why it's missing.... and I guess it's only some of the CSS that's missing?

Not sure if I understand your question about a link... this is currently a one page website, so all links are external.

migurski commented 10 years ago

Hm, no links. I guess what I’ll need to do is make myself an Ubuntu desktop VM and try it out there. What version of Ubuntu are you on?

KathleenLD commented 10 years ago

Oh god that sounds tedious. I think 13.04, but just powered down so I'm not sure. On Jan 11, 2014 4:42 PM, "migurski" notifications@github.com wrote:

Hm, no links. I guess what I’ll need to do is make myself an Ubuntu desktop VM and try it out there. What version of Ubuntu are you on?

— Reply to this email directly or view it on GitHubhttps://github.com/codeforamerica/git-jekyll-preview/issues/1#issuecomment-32108037 .

KathleenLD commented 10 years ago

Yeah, it's 13.04, but it's not unlikely that it's user error... what's weird is that I didn't have this problem w/ openstreetmap.us on the same system. Even so, I'd hate for you to go to the trouble for something I'm messing up. I'll work on troubleshooting more today if I get time.

migurski commented 10 years ago

I gave this a try on Ubuntu, and was able to duplicate your bug in Chrome but not in Firefox.

migurski commented 10 years ago

Okay, getting to the bottom of this. It looks like the inclusion of Mapbox and Google Fonts scripts from non-SSL URLs causes Chrome to flip out and ignore the CSS from the current site as well. I made Jekit work over SSL when I was still passing around Github usernames and passwords, but now that it's all OAuth based I think it would be safe to ditch the SSL.

migurski commented 10 years ago

Can you check that it works for you now? I'll look at the master/gh-pages confusion separately.

KathleenLD commented 10 years ago

Success! This resolved the bug in both FF and Chrome.

migurski commented 10 years ago

I made the error with a bad branch name a bit more explicit; it no longer thinks that the entire repo is AWOL.