summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-07-26 22:47:14 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-07-26 23:15:09 -0400
commit2f6b06dd22f6f117d0a52e03d90f41a810889519 (patch)
tree072c67d2dbf86d6566d72485c60ffdf06672764d
parent348e16e264869aee29c36f6b25a48b81b871169d (diff)
asset: Add brief documentation.
* haunt/asset.scm: Add introductory comment. * README.md (Example Configuration): Add 'directory-assets' example.
-rw-r--r--README.md6
-rw-r--r--example/haunt.scm1
-rw-r--r--haunt/asset.scm5
3 files changed, 10 insertions, 2 deletions
diff --git a/README.md b/README.md
index 954312f..4c13a28 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/example/haunt.scm b/example/haunt.scm
index 52782dc..66a8392 100644
--- a/example/haunt.scm
+++ b/example/haunt.scm
@@ -1,5 +1,6 @@
(use-modules (haunt site)
(haunt reader)
+ (haunt asset)
(haunt builder blog)
(haunt builder atom)
(srfi srfi-19))
diff --git a/haunt/asset.scm b/haunt/asset.scm
index ba69e77..0255010 100644
--- a/haunt/asset.scm
+++ b/haunt/asset.scm
@@ -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?