Next: , Previous: , Up: Programming Interface   [Contents][Index]

5.5 Assets

(use-modules (haunt asset))

Assets represent files on disk that should be copied verbatim to a site’s output directory. Common types of assets include CSS, JavaScript, images, and fonts.

Scheme Procedure: make-asset source target

Create a new asset object. The source and target arguments are file names that are relative to a site source and target directory, respectively (see Sites).

Scheme Procedure: asset? object

Return #t if object is an asset object.

Scheme Procedure: asset-source asset

Return the source file name for asset.

Scheme Procedure: asset-target asset

Return the target file name for asset.

Scheme Procedure: install-asset asset prefix

Install the source file of asset into the target directory within prefix.

Scheme Procedure: directory-assets directory keep? dest

Create a list of asset objects to be stored within dest for all files in directory that match keep?, recursively.