summaryrefslogtreecommitdiff
path: root/example/posts/foo.sxml
blob: d49d420f4209f66d6452c1f6fd3d7cab5a1ef8c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;;; -*- scheme -*-

(use-modules (srfi srfi-41)
             (haunt utils))

(define fib
  (stream-cons 0 (stream-cons 1 (stream-map + fib (stream-cdr fib)))))

(define count 20)

`((title . "Hello, world!")
  (date . ,(string->date* "2015-04-10 23:00"))
  (tags "foo" "bar")
  (summary . "Just a test")
  (content
   ((h2 "What is this thing?")
    (p "This is Haunt.  A static site generator for GNU Guile.")
    (p "SXML is cool because you can evaluate Scheme code in your blog
posts.  Here are the first "
       ,count
       " fibonacci numbers, computed with SRFI-41!")
    (pre ,(object->string
           (stream->list
            (stream-take count fib))))
    (p "Guile Scheme is great, eh?")
    (img (@ (src "/images/guile-banner.small.png"))))))