jsbin octopress plugin
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
jsbin.rb

README.md

jsbin octopress plugin

Given a bin url, generates the embed code for jsbin with defined panels. A bin url is either just the code: abcefg or you can include the revision abcefg/4 or you can point to latest: abcefg/latest. If you don't specify a revision, latest will be automatically selected.

  • panels: html, js, css, console, output (default: html,css,js,output)

Syntax

{% jsbin bin [panels] %}

Examples:

Input:

{% jsbin exedab %}

Output:

<a class="jsbin-embed" href="http://jsbin.com/exedab/latest/embed?output">JS Bin</a><script src="http://static.jsbin.com/js/embed.js"></script>

Input:

{% jsbin exedab js,html %}

Output:

<a class="jsbin-embed" href="http://jsbin.com/exedab/latest/embed?js,html">JS Bin</a><script src="http://static.jsbin.com/js/embed.js"></script>

Contributors