Enhanced Github gadget

Legacy
This page was about embedding gadgets into Google sites. Google has removed gadgets now but you may want to reuse some of the codes embedded into an iFrame.
In Dynamic height github gadget for Google Site I showed how to display prettified source code directly from your gitHub repo on your Google Site. Here’s some enhancements to that same gadget with additional options as follows;
  • You can now specify that the height is not dynamic. Like this it will behave as a regular gadget and respect the height you chose in the gadget settings. The default is  to automatically adjust its height to the content. If you choose this option, you probably should choose the option to add scroll bars too. If you choose dynamic height, you should leave the scroll bars turned off.
  • You can choose whether the gadget reveals its content only when hovered over (the default), or whether the content is shown permanently.
  • It can now render markdown documents using the github styles. I’m using this stylesheet to style which I found in Sindre Sorhus‘s github repos. I’m also using the github api to do the markdown rendering legwork.

The gadget preferences

This is the default gadget setup. You can see the new options (translate from markdown, source prettification, permanently revealed and dynamic height).
Here is the gadget source code using the default options.
The code was displaying a picture that, on mouse over, would then display the content of the Github reference.

Where to get it

The hosted address for my version of this gadget is as below. You can use it or copy and make your own.
To insert, go to insert/..More gadgets and insert by URL.