Skip to content

abby-sergz/gist-Blogger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

A simple way to embed gist into Blogger's dynamic view. By [Moski Doski](http://moski.me).

Usage

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

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

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

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

or

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

Replace "GistID" with your gist id and "GistFile" with name of file inside this gist.

Development

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

git clone git@github.com:moski/gist-Blogger.git

To start up the server, just run

rackup

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 = "https://raw.github.com/moski/gist-Blogger/master/public/gistBlogger.js";
var gistBloggerPath = "http://localhost:9292/gistBlogger.js";

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

Thanks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.1%
  • Ruby 4.9%