cullmann.io/themes/blowfish/layouts/shortcodes/codeimporter.html

9 lines
285 B
HTML
Raw Normal View History

2024-06-26 21:44:28 +02:00
{{ $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 }}