summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/shortcodes/codeimporter.html
blob: 493f444840568b8e686ca6b37d74655e0c40a621 (plain)
1
2
3
4
5
6
7
8
{{ $url := .Get "url" }}
{{ $type := .Get "type" }}
{{ with resources.GetRemote (urls.Parse $url) }}
{{ $codeBlock := printf "```%s\n%s\n```" $type .Content }}
{{ $codeBlock | markdownify }}
{{ else }}
{{ errorf "Code Importer Shortcode - Unable to get remote resource" . }}
{{ end }}