mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
Added codeimporter shortcode
- updated exampleSite.
This commit is contained in:
8
layouts/shortcodes/codeimporter.html
Normal file
8
layouts/shortcodes/codeimporter.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ $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 }}
|
||||
Reference in New Issue
Block a user