Home → Bikeshed → Components
showFile.html
Shortcode
Published: Updated:
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.
Arguments
{{< showFile path="" lang="" >}}
path
is the file you want to show (from project root including mounts)lang
is the file type. By default it is inferred by the file extension.
Source Code
Very meta.
{{- readFile (.Get "path") | safeHTML -}}