Skip to content

Commit 990fc00

Browse files
paolorediskaitlynmichael
authored andcommitted
Create hugo shortcode for embedding external json files (#1521)
1 parent 07c4acc commit 990fc00

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{ $raw := resources.GetRemote (.Get 0) }}
2+
{{ $data := transform.Unmarshal $raw.Content }}
3+
{{ $prettyJson := $data | jsonify (dict "prefix" " " "indent" " ") }}
4+
{{ highlight $prettyJson "json" "" }}

0 commit comments

Comments
 (0)