website/layouts/shortcodes/script.html (5 lines of code) (raw):
{{ $file := .Get "file" }}
{{ $version := index ( split .Page.Path `/` ) 0 }}
{{ $fileContents := replace $file `{VERSION}` $version | readFile }}
{{ $lang := .Get "language" }}
{{ (print "```" $lang "\n" $fileContents "```") | safeHTML }}