kitsune-hosting/themes/kitsune-theme/layouts/shortcodes/image.html

10 lines
401 B
HTML

{{/* This never really worked but its cool to be able to make shortcodes like this for use in MD */}}
{{ $image := .Page.Resources.GetMatch (printf "*%s" (.Get 0)) }}
{{ if $image }}
<img src="{{ $image.RelPermalink }}" alt="{{ $image.Title }}">
{{ else }}
<!-- Would be cool to make an error-box for stuff like this in css -->
<p>Serverside shortcode Error, couldn't load {{ .Get 0 }}</p>
{{ end }}