Added codeimporter shortcode

- updated exampleSite.
This commit is contained in:
Manjunath Mohan
2024-05-10 11:50:28 +05:30
parent 13ff6f5341
commit 07d1396986
2 changed files with 33 additions and 0 deletions

View 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 }}