summaryrefslogtreecommitdiff
path: root/haunt.scm
diff options
context:
space:
mode:
Diffstat (limited to 'haunt.scm')
-rw-r--r--haunt.scm60
1 files changed, 29 insertions, 31 deletions
diff --git a/haunt.scm b/haunt.scm
index d3da8fa..989e7a8 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -50,7 +50,7 @@
`(link (@ (rel "stylesheet")
(href ,(string-append "/css/" name ".css")))))
-(define (anchor content uri)
+(define* (anchor content #:optional (uri content))
`(a (@ (href ,uri)) ,content))
(define %cc-by-sa-link
@@ -186,6 +186,9 @@ free culture works available under the " ,%cc-by-sa-link " license.")
(define (highlight-scheme code)
`(pre (code ,(highlights->sxml (highlight lex-scheme code)))))
+(define (raw-snippet code)
+ `(pre (code ,(if (string? code) code (read-string code)))))
+
;; Markdown doesn't support video, so let's hack around that! Find
;; <img> tags with a ".webm" source and substitute a <video> tag.
(define (media-hackery . tree)
@@ -457,40 +460,35 @@ rendering."))
#:description
`(,(centered-image "/images/haunt/logo.png" "crudely drawn ghost")
(p "Haunt is a simple, functional, hackable static site generator
-written in Guile Scheme that gives authors the ability to treat
-websites as programs.")
- (p "Haunt isn't your average static site generator. Its mission
-is to give authors the full expressive power of Scheme to determine
-how every aspect of their websites are generated. Haunt uses a
-simple, functional build system that allows any type of web page to be
-built by writing procedures that return page objects.")
+that gives authors the ability to treat websites as Scheme programs.")
+ (p "By giving authors the full expressive power of Scheme, they
+are able to control every aspect of the site generation process.
+Haunt provides a simple, functional build system that can be easily
+extended for this purpose.")
(p "Haunt has no opinion about what markup language authors
-should use to write posts. Just write the relevant reader procedure
-and Haunt will happily work with that format. Likewise, Haunt has no
-opinion about how authors structure their sites. Haunt ships with
-helpful builder procedures that generate simple blogs or Atom feeds,
-but authors should feel empowered to tweak them, write replacements,
-or add new builders to do things that the Haunt hackers didn't think
-of."))
+should use to write posts, though it comes with support for the
+popular Markdown format. Likewise, Haunt has no opinion about how
+authors structure their sites. Though it comes with support for
+building simple blogs or Atom feeds, authors should feel empowered to
+tweak, replace, or create builders to do things that aren't provided
+out-of-the-box."))
#:usage
`((p "Here's what a simple Haunt configuration looks like:")
,(call-with-input-file "snippets/haunt.scm" highlight-scheme)
- (p "With the above saved into a file named "
- (code "haunt.scm")
- " and a "
- (code "posts")
- " directory populated with the articles to publish,
-the site can be built by running "
- (code "haunt build")
- ". Once the site is built, running "
- (code "haunt serve")
- " and visiting "
- (code "localhost:8080")
- " in a web browser will show the results of the build
-without needing to upload the generated files to a web server."))
- #:requirements '("GNU Guile >= 2.1.4"
- "guile-reader (for Skribe support, optional)"
- "guile-commonmark (for Markdown support, optional)")
+ (p "In a new directory, save the above to a file named "
+ (code "haunt.scm") ".")
+ (p "Create a subdirectory named " (code "posts") ".")
+ (p "Add the following to a new file named " (code "posts/hello.md") ":")
+ ,(call-with-input-file "snippets/haunt-hello.md" raw-snippet)
+ (p "Run " (code "haunt build") " to build the site.")
+ (p "Run " (code "haunt serve") " to a launch a web server to
+preview your work.")
+ (p "Open " ,(anchor "http://localhost:8080") " in your web browser
+and smile, because you've just generated your first Haunt site!"))
+ #:requirements
+ '("GNU Guile >= 2.0"
+ "guile-commonmark (for Markdown support, optional)"
+ "guile-reader (for Skribe support, optional)")
#:license "GNU GPLv3+"
#:releases
`(("0.2.2" ,(date 2018 03 10))