asset: Add brief documentation.

* haunt/asset.scm: Add introductory comment.
* README.md (Example Configuration): Add 'directory-assets' example.
This commit is contained in:
David Thompson 2015-07-26 22:47:14 -04:00
parent 348e16e264
commit 2f6b06dd22
3 changed files with 10 additions and 2 deletions

View File

@ -23,7 +23,8 @@ Example Configuration
(use-modules (haunt site)
(haunt reader)
(haunt builder blog)
(haunt builder atom))
(haunt builder atom)
(haunt builder assets))
(site #:title "Built with Guile"
#:domain "example.com"
@ -33,7 +34,8 @@ Example Configuration
#:readers (list sxml-reader html-reader)
#:builders (list (blog)
(atom-feed)
(atom-feeds-by-tag)))
(atom-feeds-by-tag)
(static-directory "images"))
```
Usage

View File

@ -1,5 +1,6 @@
(use-modules (haunt site)
(haunt reader)
(haunt asset)
(haunt builder blog)
(haunt builder atom)
(srfi srfi-19))

View File

@ -35,6 +35,11 @@
install-asset
directory-assets))
;; Assets are static files that are copied verbatim from a site's
;; source directory to the target output directory, such as images,
;; CSS, and JavaScript files. The 'source' and 'target' fields are
;; file names that are relative to a source and target directory,
;; respectively.
(define-record-type <asset>
(make-asset source target)
asset?