example: Add image asset.

* example/haunt.scm: Add static directory builder.
* example/images/guile-banner.small.png: New file.
* example/posts/foo.sxml: Render Guile banner image.
This commit is contained in:
David Thompson 2015-07-27 08:54:30 -04:00
parent 2d82b5f2f0
commit 228932a48b
3 changed files with 8 additions and 2 deletions

View File

@ -3,6 +3,7 @@
(haunt asset)
(haunt builder blog)
(haunt builder atom)
(haunt builder assets)
(srfi srfi-19))
(site #:title "Built with Guile"
@ -13,4 +14,5 @@
#:readers (list sxml-reader html-reader)
#:builders (list (blog)
(atom-feed)
(atom-feeds-by-tag)))
(atom-feeds-by-tag)
(static-directory "images")))

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,3 +1,5 @@
;;; -*- scheme -*-
(use-modules (srfi srfi-41)
(haunt utils))
@ -19,4 +21,6 @@ posts. Here are the first "
" fibonacci numbers, computed with SRFI-41!")
(pre ,(object->string
(stream->list
(stream-take count fib)))))))
(stream-take count fib))))
(p "Guile Scheme is great, eh?")
(img (@ (src "/images/guile-banner.small.png"))))))