Static Files

In addition to renderable and convertible content, we also have static files.

A static file is a file that does not contain any YAML front matter. These include images, PDFs, and other un-rendered content.

They’re accessible in Liquid via site.static_files and contain the following metadata:

Variable Description

file.path

The relative path to the file, e.g. /assets/img/image.jpg

file.modified_time

The `Time` the file was last modified, e.g. 2016-04-01 16:35:26 +0200

file.name

The string name of the file e.g. image.jpg for image.jpg

file.basename

The string basename of the file e.g. image for image.jpg

file.extname

The extension name for the file, e.g. .jpg for image.jpg