-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub gist changes break gist plugin formatting #847
Comments
Just taking a look into it now. Taking a look at the gist plugin, it looks like everything is working (URL endpoints, etc, are all still functional). It's probably the case that the new gist styling in the script file (gist.github.com/gist_no.js) is including new CSS (complete with |
Shite, Github has eff'd this all up. @imathis, I'd recommend throwing out the script thing (.js) altogether and just using the code. Github's added waayyy too many styles, most of which has |
_syntax.scss will definitely have to be changed, to match the new gist output hierarchy: |
It also looks like a Gist-wide issue (perhaps a fix is on its way?): (from Github Flavored Markdown page) |
Looks like they also broke embeds that don't specify a file name - doesn't display anything at all (and thus broke all of mine) |
I have got my gists so that they are at least displaying now (although horribly formatted) by adding a specific filename. However, one of my gists was pointing at an Objective-C category file with the name |
My gist code embedded gist page involves right justify and a deal of new lines. |
PR #849 fixes the issue of Gists not showing because of the missing file name - still looks horrible, but at least the content is there. |
I'm on this, I'll have a fix up hopefully tonight. While it's nice to be able to use Gists to embed things, I think this is a good time to point out, having external content isn't generally a good practice.
There are some good use cases for gists, but in general I recommend switching to locally generated code. Remember you can still link out to the gist like this:
This way you can still link to gists to allow people to fork, comment, and user other cool gist features. |
I was able to temporarily resolve this using the fix from #849 and the following CSS overrides: .highlight {
background: none !important;
}
.line_numbers {
line-height: 18px;
font-size: 13px;
} |
We're re-writing the Gist plugin, and this will be dealt with then. |
just to clarify, this is still 'broken', yes? I just updated to master and my gists are still a little 'off'... the background color only extends to the right as far as the longest line even though the bounding box is wider than that. example: If it's still broken, that's fine, I'm patient, I just want to make sure I haven't broken something on my own accord :) |
Yep it's still "broken" on the master branch. The 2.1 branch has a fix if you want that. |
I'm using the most standard github settings possible. With this configs my gist are broken and have this ugly extra new line added. How do I change to 2.1 to get it fixed? example: |
I'm taking a stab at a |
@jbrains That's actually quite similar to something I've already written for 3.0. I'm hoping to release it soon as a standalone gem plugin under the Octopress org repository. I've already released the pygments and codefence plugins that way. |
Thanks, Brandon. I got that impression, although I couldn't figure out in the first 3 minutes how you intended to implement that for 3.0, so I figured I'd not worry about it. I'll put something together for 2.x, because it gives me something to do. |
@jbrains Any updates on this? Could really use that now ;-) |
Slowly working on it. I don't know when I can finish it. I won't be quiet J. B. Rainsberger :: jbrains.ca
|
This is very sad that this issue is still not solved. What is the point allowing people to post gists if they look terrible after rendering the html. To get my link to look as it should I have to disable this css property. .post div { are you guys going to fix the issue. It doesn't look so difficult or does it? |
Done. #1422 |
For more information: - imathis/octopress#847 - imathis/octopress#1422
Not sure if it's going to be of much value once octopress-gist is in use, but I fixed Gist styling on my blog for the time being by overriding watsonbox/watsonbox.github.com@e0a7a90 I can always create a pull request if this does seem useful for the current master branch. Perhaps it would be better to only render the JS block if a global config option is set, and if there are embedded gists on the page. |
This is my attempt at a fix: cancan101/cancan101.github.io@d30d956 |
They changed the interface of Gist again. It is not working and behaving like what @rtomaszewski posted. |
I think removing these two will fix the problem: font-size: 13px;
line-height: 1.45em; |
Followed cancan101/cancan101.github.io@d30d956 and imathis/octopress#847 and discovered that manually changing `sass/partial/_syntax.scss` will do. Changing the SCSS file under `.themes/classics/` is *unnecessary*.
This fix my issue with formatting using the Jetpack gist shortcode. |
I realize this is an old thread, but your discussion is the closest one to my question that I could find. Would you, by any chance, know what is github doing to generate the html code for the embed? I mean, which syntax highlighter and style are used to generate the arguments in the documentwrite commands? Thanks! |
@pablocobelli The relevant code is open source: jekyll-gist. |
Not sure exactly what the issue is but GitHub updated their gists today and it looks like it breaks a few things with regards to the gist plugin.
Here is how a gist on my site looks: http://lukecod.es/blog/2012/02/14/pitchfork-dot-com-album-rating-api/
It looks like at least two things are broken:
I plan to take a look at this over the next couple days, but thought I'd open an issue to avoid duplicates and in case anyone wants to take a look at it sooner.
The text was updated successfully, but these errors were encountered: