Skip to content

Instantly share code, notes, and snippets.

@runewake2
Created January 7, 2020 06:53
Show Gist options
  • Save runewake2/3f5d3b4827beefb56a66e9c228979820 to your computer and use it in GitHub Desktop.
Save runewake2/3f5d3b4827beefb56a66e9c228979820 to your computer and use it in GitHub Desktop.
A custom hugo shortcode that draws a shadertoy.com shader.
<!-- A Hugo Shortcode that can embed a Shadertoy shader -->
{{ with .Get "id" }}
<iframe
src="//www.shadertoy.com/embed/{{ . }}"
title="ShaderToy Shader"
height="500"
frameborder="0"
marginwidth="0"
marginheight="0"
scrolling="no"
style="box-shadow: 0px 5px 10px rgb(0, 175, 255); margin-bottom: 10px; margin-top: 10px; width: 100%;"
allowfullscreen="true">
</iframe>
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment