Farai → Bikeshed → Components
showFile.html Shortcode
A “meta” shortcode which I use to show the contents of a specific file I use on this site and applies syntax highlighting to it. For some reason I can’t use syntax highlighting via code fences in markdown so you’ll need to use the highlight shortcode.
Arguments
{{< showFile path="" lang="" >}}
pathis the file you want to show (from project root including mounts)langis the file type. By default it is inferred by the file extension.
Source Code
Very meta.
{{- readFile (.Get "path") | safeHTML -}}