moski / gist-blogger Goto Github PK
View Code? Open in Web Editor NEWAdding Gist support to blogger dynamic view
Home Page: http://blog.moski.me/2012/01/gist-with-bloggers-dynamic-views.html
Adding Gist support to blogger dynamic view
Home Page: http://blog.moski.me/2012/01/gist-with-bloggers-dynamic-views.html
I can't manage to get the gists loading on my blog when I use Internet Explorer (IE 10). Also I've tried viewing posts containings gists from other blogs with IE and encountered the same problem.
Chrome Console Displays: Refused to execute script from 'https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
Searching for a fix lead me here: http://stackoverflow.com/questions/17341122/link-and-execute-external-javascript-file-hosted-on-github
Which lead me here: https://github.com/blog/1482-
Turns out it can't be linked to the github hosted version; self hosting the two js files (and modifying the link in the loader.js file) fixed the issue for me.
If you see this blog post using gist-blogger we do not have any comment panel or like button at the bottom of the post..
gist-blogger-theme-mosaic-Not-working-blog
but the comment panel is visible in using google prettier in blog
google-prettier-working
In other view like sidebar, gist-blogger is working good :
bad-blog-working-in-theme-sidebar
Can we make the comment panel visible in mosaic view too in first blog ?
I have long lines in Ruby code. I switch on soft-wrap on gist.github.com, but nothing is altered, long lines aren't wrapped.
Hello Moski,
Thanks for the awesome effort for creating gist-Blogger. I've been using it and finding it really handy. Is there a way to modify the script to embed it within Blogger's HTML template?
I've tried including it this way, right before but it does not work
<script expr:src='data:blog.dynamicViewsCommentsSrc'/>
<script src='https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js' type='text/javascript'/>
Thanks,
Hanxue
I just gave this a try and it failed,
Uncaught ReferenceError: $ is not defined gistBlogger.js:125
This was a standard theme from Blogger...
The instructions in the Readme allow gists in dynamic views, yaaaay! However my blog is set up to use a mobile friendly template when Blogger detects a mobile device. This doesn't load the gist-Blogger workaround and as a result only displays the text within the <div>
tag.
This:
<div class="gistLoad" data-id="GistID" id="gist-GistID">Loading ....</div>
Displays:
Loading ....
As a workaround I use the following form in my HTML
for my blog so that it gracefully degrades to using the proper GitHub gist loading script on mobile. However on desktop it uses gist-Blogger correctly.
<div class="gistLoad" data-id="GistID" id="gist-GistID">
<script src="https://gist.github.com/GitUserName/GistID.js">Loading ....</script>
</div>
Can this be rolled into the code somehow? Or the Readme updated?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.