Skip to content

Instantly share code, notes, and snippets.

Last active December 7, 2020 03:18
What would you like to do?
A simple way to embed gist into Blogger's dynamic view.
<!-- to do: make this parse -->
<div class="clipboardEmbedClip" data-clip-id="LQL1lDhsxPcZfc2h4vuk3E1MpI-5Xc_CPlqe" data-width="782" data-height="763" data-scale="disabled">
<script type="text/javascript">(function() {if (!window.CLIPBOARD || !window.CLIPBOARD.widgets) {var elem = document.createElement("script");elem.type = "text/javascript";elem.async = true;elem.src = "//";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(elem, s);}})();
A simple way to embed gist into Blogger's dynamic view. By [Moski Doski](




At the end of each of your blog posts, include the following code using the HTML editor:

<script src="" type="text/javascript"></script>

Now to include any gist template just add the following anywhere in your blog post.

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

Replace "GistID" with your gist id.


If you want to work with this script locally. You need to clone the repo using

git clone

To start up the server, just run


Now, to use the local version of the script, change the script embed code in your post to the local version

<script src="http://localhost:9292/gistLoader.js" type="text/javascript"></script>

You also need to change the main script path inside (gistLoader.js)

//var gistBloggerPath = "";
var gistBloggerPath = "http://localhost:9292/gistBlogger.js";

That's it, now blogger will start calling your script.


Copy link

I'm getting

Refused to execute script from '' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

from chrome attempting to use this

Copy link

mcmoe commented Aug 25, 2017

@ImaginaryDevelopment Use instead of - read this for more details

[GitHub] added the X-Content-Type-Options: nosniff header to [their] raw URL responses [to] combating hotlinking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment