Skip to content

Instantly share code, notes, and snippets.

@codec
Last active October 4, 2017 18:25
Show Gist options
  • Save codec/6462560 to your computer and use it in GitHub Desktop.
Save codec/6462560 to your computer and use it in GitHub Desktop.
Confluence User Macro for gists
## @param gist:title=gist URL|type=string|required=true
#set ( $gist = $paramgist.replace("https://gist.github.com/", '') )
#set ( $data = [] )
#foreach($part in $gist.split("/"))
#set ($t = $data.add($part))
#end
#set( $gistuser = $data.get(0) )
#set( $gisthash = $data.get(1) )
<script type="text/javascript" src="https://gist.github.com/${gistuser}/${gisthash}.js">
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment