Skip to content

Instantly share code, notes, and snippets.

@SamBarker
Forked from azam/gist4sites.xml
Last active February 20, 2018 20:34
Show Gist options
  • Save SamBarker/5b848df147d54558025058ebdaf319e2 to your computer and use it in GitHub Desktop.
Save SamBarker/5b848df147d54558025058ebdaf319e2 to your computer and use it in GitHub Desktop.
Gadget to embed gist on Google Site. Use this url as gadget URL when inserting to a Google Site page: https://gist.githubusercontent.com/SamBarker/5b848df147d54558025058ebdaf319e2/raw/8259b1b0ae158d303e32a0b8e6cc7623940e2f70/gist4sites.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Google Sites Gist Module">
<Require feature="dynamic-height"/>
</ModulePrefs>
<UserPref name="gistId" display_name="Gist #" required="true" />
<UserPref name="gistFile" display_name="File Name" required="false" />
<UserPref name="baseUrl" display_name="Base URL" required="false" default_value="https://gist.github.com"/>
<Content type="html">
<![CDATA[
<div id="content_div"><script src="__UP_baseUrl__/__UP_gistId__.js?file=__UP_gistFile__"></script><script type="text/javascript">gadgets.util.registerOnLoadHandler(gadgets.window.adjustHeight);</script></div>
]]>
</Content>
</Module>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment