readFile
Syntax
readFile PATH
Note that the filename must be relative to the current project working directory.
So, if you have a file with the name README.txt
in the root of your project with the content Hugo Rocks!
:
{{readFile "README.txt"}} → "Hugo Rocks!"
For more information on using readDir
and readFile
in your templates, see Local File Templates.