1

I have the following gist...

https://gist.github.com/4445255

I try adding it to my Blogger entry (per here) into my post by adding this to the very end...

<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>

finally in position I add

<div class="gistLoad" data-id="4445255" id="gist-GistID">Loading ....</div>

But it just shows loading...

4 Answers 4

1

The script you just referenced (gistLoader.js) contains a call to the function initGist(), which I do not see anywhere.

It is also looking for a DOM element by the id "gistPrinter", when the element you have created has an id of "gist-GistID".

I'm not familiar with gist, maybe someone else can correct me.

EDIT: I found initGist() here: https://raw.github.com/moski/gist-Blogger/master/public/gistBlogger.js

Sign up to request clarification or add additional context in comments.

Comments

1

I hadn't yet converted my project over to a Dynamic View. So I went to Template>Dynamic View.

There is a little issue, saving formatting only seems to work in IE for dynamic views...

http://productforums.google.com/forum/#!topic/blogger/S_uVwRQQrOY%5B1-25-false%5D

Comments

0

You forgot to setup on of the attributes. It should look like this.

<div class="gistLoad" data-id="4445255" id="gist-4445255">Loading ....</div>

Comments

0

I had recently found this issue wherein the gist was not loading after putting the embed url eg

<script src="https://gist.github.com/dishabhatt123/43e98122304000687293b4c3ef3dc474.js"></script>

directly into the HTML view of my blog. Here is what has finally helped me after grilling down.

Basically browsers does not support random included scripts hence using rawgist. Place the below script on the top of bottom of the page.

<script src="https://rawgit.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>

Then, add the div as under:

<div class="gistLoad" data-id="43e98122304000687293b4c3ef3dc474" id="gist-43e98122304000687293b4c3ef3dc474">Loading or something, this is just text to display while the browser pulls the gist....</div>

Here, in the above div, data-id ="whereveryourgistidis" and id="gist - whereveryourgistidis"

In the above example of embed url, my gist Id is '43e98122304000687293b4c3ef3dc474'. You can replace it with your gist id from the embed url.

Please Note: you will not see the gist in 'Compose view'. But when you preview your blog, you can see it!!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.