blowfish/layouts/shortcodes/codeimporter.html
Manjunath Mohan 07d1396986 Added codeimporter shortcode
- updated exampleSite.
2024-05-10 12:11:46 +05:30

8 lines
281 B
HTML

{{ $url := .Get "url" }}
{{ $type := .Get "type" }}
{{ with resources.GetRemote (printf $url) }}
{{ $codeBlock := printf "```%s\n%s\n```" $type .Content }}
{{ $codeBlock | markdownify }}
{{ else }}
{{ errorf "Code Importer Shortcode - Unable to get remote resource" . }}
{{ end }}