summaryrefslogtreecommitdiff
path: root/example/posts/foo.sxml
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-04-13 19:53:39 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-04-13 19:53:39 -0400
commitfdb70223a709e4a523f8503142b05e94029b7790 (patch)
tree4841d6de0f841d56c1061e1a5bf3a22670a1b484 /example/posts/foo.sxml
parent913c6bed6f7e8ae12b6881584698f29a698431c4 (diff)
Add example site.
* .gitignore: Ignore example build artifacts. * example/haunt.scm: New file. * example/posts/foo.sxml: New file. * example/posts/bar.html: New file.
Diffstat (limited to 'example/posts/foo.sxml')
-rw-r--r--example/posts/foo.sxml22
1 files changed, 22 insertions, 0 deletions
diff --git a/example/posts/foo.sxml b/example/posts/foo.sxml
new file mode 100644
index 0000000..4edde18
--- /dev/null
+++ b/example/posts/foo.sxml
@@ -0,0 +1,22 @@
+(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)))))))