Compare commits

...

32 Commits

Author SHA1 Message Date
Dan Frumin 0130760f3f Add the `site-posts-output-directory` field.
- Remove the "prefix" argument from the theme objects in the blog
  builder.
- Remove the "blog-prefix" argument from the rss and atom builders.

A user can specify the output directory for the posts in the SITE
record, this, together with the SITE-SLUG function, allows one to
generate relative and absolute URLs to the posts. This information is
used in all the builders that operate on posts collections.
2019-12-16 13:50:33 +01:00
Philip K 65adbb052f atom: Change date format from ISO-8601 to RFC-3339.
* haunt/builder/atom.scm (date->string*): Format in RFC-3339 style.
2019-08-15 07:47:39 -04:00
Dan Frumin d66515e8b3 guix: Update module includes to work with newer versions of Guix. 2019-06-28 08:36:41 -04:00
Dan Frumin e4d7e9b605 doc: Fix typo in "Builders" section.
* doc/haunt.texi: Fix typo.
2019-06-28 08:36:41 -04:00
David Thompson d92411f7c1 atom: Add 'id' attribute to feed and entries. 2019-06-28 08:29:09 -04:00
David Thompson 794125e408 site: Add scheme field.
* haunt/site.scm (<site>)[scheme]: New field.
  (site): Add #:scheme keyword argument.
2019-06-28 08:26:01 -04:00
David Thompson efb1739a69 configure: Accept Guile 3.0. 2019-05-21 08:40:51 -04:00
Jakob L. Kreuze 142006f884 reader: html: Add support for multiple top-level elements.
Currently, if given a file containing more than one top-level elements,
'read-html-post will only return the first.
2019-05-21 08:40:40 -04:00
humanitiesNerd e25ed2d569 reader: skribe: Add additional HTML 5 tags.
* haunt/skribe/utils.scm (h5 h6 section nav aside): New procedures.
2019-01-05 12:06:44 -05:00
David Thompson 1bfb388123 Bump version to 0.2.4. 2018-11-29 11:40:46 -05:00
Christopher Lemmer Webber 286edaa5de atom: links should use href attribute, not url attribute.
* haunt/builder/atom.scm (post->atom-entry): Switch url attribute to
  href attribute.
2018-11-29 11:29:59 -05:00
David Thompson a7dac982c2 git: Ignore tarball signature files. 2018-11-25 16:05:46 -05:00
David Thompson 928f0e2921 Bump version to 0.2.3. 2018-11-25 15:59:07 -05:00
David Thompson 98471930c9 README: Mention RSS. 2018-11-25 15:58:42 -05:00
Christopher Lemmer Webber 8891da0e3a Add RSS support.
* haunt/builder/rss.scm: New file with support for RSS feeds.
* Makefile.am: Add it.
2018-11-25 15:56:21 -05:00
David Thompson 15c4605e1d atom: Add support for enclosures.
The most notable use-case here is allowing Haunt to be used for
podcasting.  Thanks to Christopher Lemmer Webber for wanting to use
Haunt to build their podcast Atom feed!

* haunt/builder/atom.scm (<enclosure>): New record type.
(make-enclosure, enclosure?, enclosure-title, enclosure-url,
enclosure-extra, enclosure-mime-type, parse-enclosure): New
procedures.
(post->atom-entry): Render enclosures.
2018-11-18 20:47:47 -05:00
David Thompson 51e2f10645 post: Add post-ref-all procedure.
* haunt/post.scm (post-ref-all): New procedure.
2018-11-18 20:46:36 -05:00
David Thompson ea14e56f0c post: Fix export for register-metadata-parser!
* haunt/post.scm: Fix typo preventing other modules from using
  register-metadata-parser!
2018-11-18 20:45:31 -05:00
David Thompson b37ef63b8a Thank Jorge Maldonado Ventura. 2018-04-02 10:11:06 -04:00
Jorge Maldonado Ventura f49a5cb3d4 doc: Fix tarball download link.
* doc/haunt.texi (Downloading): Fix outdated download link.
2018-04-02 10:10:18 -04:00
David Thompson efa145cc4b Thank Alex Kost. 2018-03-19 10:11:25 -04:00
David Thompson 2cab166b3f Bump to version 0.2.2. 2018-03-10 19:59:35 -05:00
David Thompson e8e0065b81 Makefile: Fix compiled Guile file installation directory. 2018-03-10 19:59:18 -05:00
Ludovic Courtès ac1156e027 guix: Switch to Guile 2.2.
* guix.scm <inputs>: Switch to GUILE-2.2.
2017-12-21 08:51:13 -05:00
Ludovic Courtès e7b1b290b1 serve: Fix 'file-extension' so that the right MIME type is chosen.
Reported by sirgazil at
<https://lists.gnu.org/archive/html/guile-user/2017-12/msg00070.html>.

* haunt/serve/mime-types.scm (%file-ext-regexp): Remove.
(file-extension): Rewrite using 'string-rindex'.
2017-12-21 08:51:02 -05:00
David Thompson 4bf24d36f6 Thank Urbain Vaes. 2017-11-01 13:40:22 -04:00
David Thompson 99181c71bc html: Stop escaping apostrophes.
This was breaking the rendering of documents like:

    '(p (@ (onclick "javascriptFunction('argmunent')")))

The single quotes would be escaped and then the onclick handler
wouldn't work at all.

* haunt/html.scm (%escape-codes): Remove apostrophe escape code.
2017-11-01 11:57:28 -04:00
Jelle Licht be68ae7410 ui: serve: Fix deprecation warning.
* haunt/ui/serve.scm: Add '(ice-9 threads)' module import.
2017-10-31 11:07:19 -04:00
Sudarshan S Chawathe 829ee49c2d Don't ignore a specified non-default port in 'haunt serve'.
Without this patch 'haunt serve' claims to use the specified
non-default port, but in fact uses the default 8080 instead.
2017-09-03 15:05:05 -04:00
David Thompson 9e4fba766d website: Update manual. 2017-01-23 20:40:04 -05:00
David Thompson 16bc1eae0c Add 0.2.1 release announcement. 2017-01-23 20:14:59 -05:00
David Thompson 6568361bd3 Add 'make publish' target. 2017-01-23 19:45:05 -05:00
47 changed files with 950 additions and 285 deletions

1
.gitignore vendored
View File

@ -13,6 +13,7 @@ Makefile.in
/example/site/
/scripts/haunt
*.tar.gz
*.tar.gz.asc
/website/site
/test-env
*.log

View File

@ -38,7 +38,7 @@ SUFFIXES = .scm .go
$(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<"
moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/ccache
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
bin_SCRIPTS = \
scripts/haunt
@ -54,6 +54,7 @@ SOURCES = \
haunt/builder/assets.scm \
haunt/builder/atom.scm \
haunt/builder/blog.scm \
haunt/builder/rss.scm \
haunt/reader.scm \
haunt/reader/texinfo.scm \
haunt/ui.scm \
@ -103,3 +104,8 @@ SUBDIRS = \
CLEANFILES = \
$(GOBJECTS) \
$(TESTS:tests/%.scm=%.log)
publish: distcheck
gpg --sign --armor --yes haunt-$(VERSION).tar.gz && \
scp haunt-$(VERSION).tar.gz haunt-$(VERSION).tar.gz.asc \
blog@dthompson.us:/var/www/files/haunt/

2
README
View File

@ -5,7 +5,7 @@ simple, functional, and extensible.
* Features
- Easy blog and Atom feed generation
- Easy blog and Atom/RSS feed generation
- Supports any markup language that can be parsed to SXML
- Simple development server
- Purely functional build process

3
THANKS
View File

@ -1,2 +1,5 @@
Ben Sturmfels <ben@sturm.com.au>
Vladimir Zhbanov <vzhbanov@gmail.com>
Urbain Vaes <urbain@vaes.uk>
Alex Kost <alezost@gmail.com>
Jorge Maldonado Ventura <jorgesumle@freakspot.net>

View File

@ -1,6 +1,6 @@
dnl -*- Autoconf -*-
AC_INIT(Haunt, 0.2.1)
AC_INIT(Haunt, 0.2.4)
AC_CONFIG_SRCDIR(haunt)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign])
@ -11,7 +11,7 @@ AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
AC_CONFIG_FILES([test-env], [chmod +x test-env])
AC_CONFIG_FILES([scripts/haunt], [chmod +x scripts/haunt])
GUILE_PKG([2.2 2.0])
GUILE_PKG([3.0 2.2 2.0])
GUILE_PROGS
dnl Guile-reader is needed for Skribe support

View File

@ -144,9 +144,9 @@ Happy haunting!
@node Downloading
@section Downloading
Official Haunt source code release tarballs can be found on the
@url{http://haunt.dthompson.us/downloads.html, downloads page} of
Haunt's website, along with their associated checksums.
Official Haunt source code release tarballs can be found under Releases
in @url{https://dthompson.us/projects/haunt.html, Haunt's website},
along with their associated checksums.
@node Requirements
@section Requirements
@ -803,7 +803,7 @@ files in @var{directory} that match @var{keep?}, recursively.
Builders are procedures that return one or more page objects
(@pxref{Pages}) when applied. A builder accepts two arguments: A site
(@pxref{Sites} and a list of posts (@pxref{Posts}).
(@pxref{Sites}) and a list of posts (@pxref{Posts}).
Haunt comes with a few convenient builders to help users who want to
create a simple blog with an Atom feed.

View File

@ -35,6 +35,7 @@
(gnu packages)
(gnu packages autotools)
(gnu packages guile)
(gnu packages guile-xyz)
(gnu packages pkg-config)
(gnu packages texinfo))
@ -61,7 +62,7 @@
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
(inputs
`(("guile" ,guile-2.0)))
`(("guile" ,guile-2.2)))
(propagated-inputs
`(("guile-commonmark" ,guile-commonmark)
("guile-reader" ,guile-reader)))

View File

@ -24,6 +24,7 @@
;;; Code:
(define-module (haunt builder atom)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
@ -33,39 +34,138 @@
#:use-module (haunt page)
#:use-module (haunt utils)
#:use-module (haunt html)
#:export (atom-feed
#:use-module (haunt serve mime-types)
#:use-module (web uri)
#:export (make-enclosure
enclosure?
enclosure-title
enclosure-url
enclosure-extra
enclosure-mime-type
atom-feed
atom-feeds-by-tag))
(define-record-type <enclosure>
(make-enclosure title url extra)
enclosure?
(title enclosure-title)
(url enclosure-url)
(extra enclosure-extra))
(define (enclosure-mime-type enclosure)
(mime-type (enclosure-url enclosure)))
(define char-set:enclosure-key
(char-set-union char-set:letter+digit
(char-set-delete char-set:punctuation #\: #\")
(char-set-delete char-set:symbol #\=)))
(define (parse-enclosure s)
(call-with-input-string s
(lambda (port)
(define (assert-char char)
(let ((c (read-char port)))
(unless (eqv? c char)
(error "enclosure: parse: expected" char "got" c))))
(define (whitespace? char)
(char-set-contains? char-set:whitespace char))
(define (consume-whitespace)
(match (peek-char port)
((? eof-object?) *unspecified*)
((? whitespace?)
(read-char port)
(consume-whitespace))
(_ *unspecified*)))
(define (read-escape-character)
(match (read-char port)
(#\" #\")
(#\\ #\\)
(char (error "enclosure: parse: invalid escape character:" char))))
(define (read-unquoted-string)
(list->string
(let loop ()
(let ((c (peek-char port)))
(cond
((eof-object? c)
'())
((char-set-contains? char-set:enclosure-key c)
(read-char port)
(cons c (loop)))
(else
'()))))))
(define (read-string)
(if (eqv? (peek-char port) #\")
(begin
(assert-char #\")
(list->string
(let loop ()
(match (read-char port)
((? eof-object?)
(error "enclosure: parse: EOF while reading string"))
(#\" '())
(#\\ (cons (read-escape-character) (loop)))
(char (cons char (loop)))))))
(read-unquoted-string)))
(define (read-key)
(string->symbol (read-unquoted-string)))
(let loop ((attrs '()))
(consume-whitespace)
(if (eof-object? (peek-char port))
(make-enclosure (assq-ref attrs 'title)
(assq-ref attrs 'url)
(let loop ((attrs attrs))
(match attrs
(() '())
((((or 'title 'url) . _) . rest)
(loop rest))
((attr . rest)
(cons attr (loop rest))))))
(let ((key (read-key)))
(assert-char #\:)
(loop (cons (cons key (read-string)) attrs))))))))
(register-metadata-parser! 'enclosure parse-enclosure)
(define (sxml->xml* sxml port)
"Write SXML to PORT, preceded by an <?xml> tag."
(display "<?xml version=\"1.0\" encoding=\"utf-8\"?>" port)
(sxml->xml sxml port))
(define (date->string* date)
"Convert date to ISO-8601 formatted string."
(date->string date "~4"))
"Convert date to RFC-3339 formatted string."
(date->string date "~Y-~m-~dT~H:~M:~SZ"))
(define* (post->atom-entry site post #:key (blog-prefix ""))
(define* (post->atom-entry site post)
"Convert POST into an Atom <entry> XML node."
`(entry
(title ,(post-ref post 'title))
(author
(name ,(post-ref post 'author))
,(let ((email (post-ref post 'email)))
(if email `(email ,email) '())))
(updated ,(date->string* (post-date post)))
(link (@ (href ,(string-append blog-prefix "/"
(site-post-slug site post) ".html"))
(rel "alternate")))
(summary (@ (type "html"))
,(sxml->html-string (post-sxml post)))))
(let ((uri (uri->string (site-post-url site post))))
`(entry
(title ,(post-ref post 'title))
(id ,uri)
(author
(name ,(post-ref post 'author))
,(let ((email (post-ref post 'email)))
(if email `(email ,email) '())))
(updated ,(date->string* (post-date post)))
(link (@ (href ,uri) (rel "alternate")))
(summary (@ (type "html"))
,(sxml->html-string (post-sxml post)))
,@(map (lambda (enclosure)
`(link (@ (rel "enclosure")
(title ,(enclosure-title enclosure))
(href ,(enclosure-url enclosure))
(type ,(enclosure-mime-type enclosure))
,@(map (match-lambda
((key . value)
(list key value)))
(enclosure-extra enclosure)))))
(post-ref-all post 'enclosure)))))
(define* (atom-feed #:key
(file-name "feed.xml")
(subtitle "Recent Posts")
(filter posts/reverse-chronological)
(max-entries 20)
(blog-prefix ""))
(max-entries 20))
"Return a builder procedure that renders a list of posts as an Atom
feed. All arguments are optional:
@ -74,25 +174,28 @@ SUBTITLE: The feed subtitle
FILTER: The procedure called to manipulate the posts list before rendering
MAX-ENTRIES: The maximum number of posts to render in the feed"
(lambda (site posts)
(make-page file-name
`(feed (@ (xmlns "http://www.w3.org/2005/Atom"))
(title ,(site-title site))
(subtitle ,subtitle)
(updated ,(date->string* (current-date)))
(link (@ (href ,(string-append (site-domain site)
"/" file-name))
(rel "self")))
(link (@ (href ,(site-domain site))))
,@(map (cut post->atom-entry site <>
#:blog-prefix blog-prefix)
(take-up-to max-entries (filter posts))))
sxml->xml*)))
(let ((uri (uri->string
(build-uri (site-scheme site)
#:host (site-domain site)
#:path (string-append "/" file-name)))))
(make-page file-name
`(feed (@ (xmlns "http://www.w3.org/2005/Atom"))
(title ,(site-title site))
(id ,uri)
(subtitle ,subtitle)
(updated ,(date->string* (current-date)))
(link (@ (href ,(string-append (site-domain site)
"/" file-name))
(rel "self")))
(link (@ (href ,(site-domain site))))
,@(map (cut post->atom-entry site <>)
(take-up-to max-entries (filter posts))))
sxml->xml*))))
(define* (atom-feeds-by-tag #:key
(prefix "feeds/tags")
(filter posts/reverse-chronological)
(max-entries 20)
(blog-prefix ""))
(max-entries 20))
"Return a builder procedure that renders an atom feed for every tag
used in a post. All arguments are optional:
@ -106,7 +209,6 @@ MAX-ENTRIES: The maximum number of posts to render in each feed"
((atom-feed #:file-name (string-append prefix "/" tag ".xml")
#:subtitle (string-append "Tag: " tag)
#:filter filter
#:max-entries max-entries
#:blog-prefix blog-prefix)
#:max-entries max-entries)
site posts)))
tag-groups))))

View File

@ -69,16 +69,12 @@
" — " ,(date->string* (post-date post)))
(div ,(post-sxml post))))
(define (ugly-default-collection-template site title posts prefix)
(define (post-uri post)
(string-append (or prefix "") "/"
(site-post-slug site post) ".html"))
(define (ugly-default-collection-template site title posts)
`((h3 ,title)
(ul
,@(map (lambda (post)
`(li
(a (@ (href ,(post-uri post)))
(a (@ (href ,(site-post-path site post)))
,(post-ref post 'title)
" — "
,(date->string* (post-date post)))))
@ -99,8 +95,8 @@
(body ((theme-post-template theme) post)))
(with-layout theme site title body)))
(define (render-collection theme site title posts prefix)
(let ((body ((theme-collection-template theme) site title posts prefix)))
(define (render-collection theme site title posts)
(let ((body ((theme-collection-template theme) site title posts)))
(with-layout theme site title body)))
(define (date->string* date)
@ -117,25 +113,24 @@
(collections
`(("Recent Posts" "index.html" ,posts/reverse-chronological))))
"Return a procedure that transforms a list of posts into pages
decorated by THEME, whose URLs start with PREFIX."
(define (make-file-name base-name)
decorated by THEME. The collection listing URL starts with PREFIX, and
the individual posts URLs start with POST-PREFIX."
(define (make-file-name prefix base-name)
(if prefix
(string-append prefix "/" base-name)
base-name))
(lambda (site posts)
(define (post->page post)
(let ((base-name (string-append (site-post-slug site post)
".html")))
(make-page (make-file-name base-name)
(render-post theme site post)
sxml->html)))
(make-page (site-post-relative-path site post)
(render-post theme site post)
sxml->html))
(define collection->page
(match-lambda
((title file-name filter)
(make-page (make-file-name file-name)
(render-collection theme site title (filter posts) prefix)
(make-page (make-file-name prefix file-name)
(render-collection theme site title (filter posts))
sxml->html))))
(append (map post->page posts)

104
haunt/builder/rss.scm Normal file
View File

@ -0,0 +1,104 @@
;;; Haunt --- Static site generator for GNU Guile
;;; Copyright © 2018 Christopher Lemmer Webber <cwebber@dustycloud.org>
;;;
;;; This file is part of Haunt.
;;;
;;; Haunt is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; Haunt is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with Haunt. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; RSS feed builder.
;;
;;; Code:
(define-module (haunt builder rss)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
#:use-module (sxml simple)
#:use-module (haunt site)
#:use-module (haunt post)
#:use-module (haunt page)
#:use-module (haunt utils)
#:use-module (haunt html)
#:use-module (haunt serve mime-types)
#:use-module (haunt builder atom)
#:export (rss-feed))
;; Reader beware: this isn't as nice as atom.scm, because rss isn't
;; as nice as atom. Worse beats better on the play field again...
;; RFC 822 dates are inferior to ISO 8601, but it's
;; what RSS wants, so...
(define (date->rfc822-str date)
(date->string date "~a, ~d ~b ~Y ~T ~z"))
(define (sxml->xml* sxml port)
"Write SXML to PORT, preceded by an <?xml> tag."
(display "<?xml version=\"1.0\" encoding=\"utf-8\"?>" port)
(sxml->xml sxml port))
(define* (post->rss-item site post)
"Convert POST into an RSS <item> node."
`(item
(title ,(post-ref post 'title))
;; Looks like: <author>lawyer@boyer.net (Lawyer Boyer)</author>
(author
,(let ((email (post-ref post 'email))
(author (post-ref post 'author)))
(string-append (if email
(string-append email " ")
"")
(if author
(string-append "(" author ")")
""))))
(pubDate ,(date->rfc822-str (post-date post)))
(link (@ (href ,(site-post-url site post))
(rel "alternate")))
(description ,(sxml->html-string (post-sxml post)))
,@(map (lambda (enclosure)
`(enclosure (@ (title ,(enclosure-title enclosure))
(url ,(enclosure-url enclosure))
(type ,(enclosure-mime-type enclosure))
,@(map (match-lambda
((key . value)
(list key value)))
(enclosure-extra enclosure)))))
(post-ref-all post 'enclosure))))
(define* (rss-feed #:key
(file-name "rss-feed.xml")
(subtitle "Recent Posts")
(filter posts/reverse-chronological)
(max-entries 20))
"Return a builder procedure that renders a list of posts as an RSS
feed. All arguments are optional:
FILE-NAME: The page file name
SUBTITLE: The feed subtitle
FILTER: The procedure called to manipulate the posts list before rendering
MAX-ENTRIES: The maximum number of posts to render in the feed"
(lambda (site posts)
(make-page file-name
`(rss (@ (version "2.0"))
(channel
(title ,(site-title site))
;; It looks like RSS's description and atom's subtitle
;; are equivalent?
(description ,subtitle)
(pubDate ,(date->rfc822-str (current-date)))
(link (@ (href ,(site-domain site))))
,@(map (cut post->rss-item site <>)
(take-up-to max-entries (filter posts)))))
sxml->xml*)))

View File

@ -57,7 +57,6 @@
(alist->hash-table
'((#\" . "quot")
(#\& . "amp")
(#\' . "apos")
(#\< . "lt")
(#\> . "gt"))))

View File

@ -36,13 +36,14 @@
post-sxml
post-metadata
post-ref
post-ref-all
post-slug
%default-date
post-date
posts/reverse-chronological
posts/group-by-tag
register-metdata-parser!
register-metadata-parser!
parse-metadata
read-metadata-headers))
@ -57,6 +58,13 @@
"Return the metadata corresponding to KEY within POST."
(assq-ref (post-metadata post) key))
(define (post-ref-all post key)
"Return a list of all metadata values for KEY within POST."
(filter-map (match-lambda
((k . v)
(and (eq? key k) v)))
(post-metadata post)))
(define char-set:slug
(char-set-union char-set:letter+digit (char-set #\-)))

View File

@ -105,8 +105,17 @@ post."
(define (read-html-post port)
(values (read-metadata-headers port)
(match (xml->sxml port)
(('*TOP* sxml) sxml))))
(let loop ()
(let ((next-char (peek-char port)))
(cond
((eof-object? next-char)
'())
((char-set-contains? char-set:whitespace next-char)
(read-char port)
(loop))
(else
(match (xml->sxml port)
(('*TOP* sxml) (cons sxml (loop))))))))))
(define html-reader
(make-reader (make-file-extension-matcher "html")

View File

@ -539,16 +539,10 @@
("vrml" . x-world/x-vrml)
("wrl" . x-world/x-vrml))))
(define %file-ext-regexp
(make-regexp "(\\.(.*)|[~%])$"))
(define (file-extension file-name)
"Return the file extension for FILE-NAME, or #f if one is not
found."
(and=> (regexp-exec %file-ext-regexp file-name)
(lambda (match)
(or (match:substring match 2)
(match:substring match 1)))))
(define (file-extension file)
"Return the extension of FILE or #f if there is none."
(let ((dot (string-rindex file #\.)))
(and dot (substring file (+ 1 dot) (string-length file)))))
(define (mime-type file-name)
"Guess the MIME type for FILE-NAME based upon its file extension."

View File

@ -33,30 +33,37 @@
#:use-module (haunt page)
#:use-module (haunt post)
#:use-module (haunt asset)
#:use-module (web uri)
#:export (site
site?
site-title
site-domain
site-scheme
site-posts-directory
site-posts-output-directory
site-file-filter
site-build-directory
site-default-metadata
site-make-slug
site-readers
site-builders
site-post-slug
site-post-path
site-post-relative-path
site-post-url
build-site
make-file-filter
default-file-filter))
(define-record-type <site>
(make-site title domain posts-directory file-filter build-directory
default-metadata make-slug readers builders)
(make-site title domain scheme posts-directory posts-output-directory file-filter
build-directory default-metadata make-slug readers builders)
site?
(title site-title)
(domain site-domain)
(scheme site-scheme) ; https or http
(posts-directory site-posts-directory)
(posts-output-directory site-posts-output-directory)
(file-filter site-file-filter)
(build-directory site-build-directory)
(default-metadata site-default-metadata)
@ -67,7 +74,9 @@
(define* (site #:key
(title "This Place is Haunted")
(domain "example.com")
(scheme 'https)
(posts-directory "posts")
(posts-output-directory "")
(file-filter default-file-filter)
(build-directory "site")
(default-metadata '())
@ -77,7 +86,10 @@
"Create a new site object. All arguments are optional:
TITLE: The name of the site
DOMAIN: The domain that will host the site
SCHEME: Either 'https' or 'http' ('https' by default)
POSTS-DIRECTORY: The directory where posts are found
POSTS-OUTPUT-DIRECTORY: The directory to store the built posts in
FILE-FILTER: A predicate procedure that returns #f when a post file
should be ignored, and #f otherwise. Emacs temp files are ignored by
default.
@ -87,13 +99,33 @@ whose keys are symbols
MAKE-SLUG: A procedure generating a file name slug from a post
READERS: A list of reader objects for processing posts
BUILDERS: A list of procedures for building pages from posts"
(make-site title domain posts-directory file-filter build-directory
default-metadata make-slug readers builders))
(make-site title domain scheme posts-directory posts-output-directory file-filter
build-directory default-metadata make-slug readers builders))
(define (site-post-slug site post)
"Return a slug string for POST using the slug generator for SITE."
((site-make-slug site) post))
(define (site-post-relative-path site post)
"Return a relative path to a POST, without the preceding slash `/'."
(let ((base-path (string-trim-right (site-posts-output-directory site)
(lambda (c) (equal? c #\/)))))
(string-append (if (equal? base-path "")
""
(string-append base-path "/"))
(site-post-slug site post)
".html")))
(define (site-post-path site post)
"Return a path to a POST, with the preceding slash `/'."
(string-append "/" (site-post-relative-path site post)))
(define (site-post-url site post)
"Return a full URL to a POST."
(build-uri (site-scheme site)
#:host (site-domain site)
#:path (site-post-path site post)))
(define (build-site site)
"Build SITE in the appropriate build directory."
(let ((posts (if (file-exists? (site-posts-directory site))

View File

@ -29,7 +29,9 @@
#:export (post
p blockquote em
h1 h2 h3 h4
h1 h2 h3 h4 h5 h6
section
nav aside
code pre strong
ul ol li dl dt dd
anchor
@ -60,7 +62,9 @@ contents from METADATA+SXML."
em strong
code samp pre kbd var
cite dfn abbr
h1 h2 h3 h4
h1 h2 h3 h4 h5 h6
section
nav aside
ul ol li dl dt dd)
(define (anchor text uri)

View File

@ -28,6 +28,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 format)
#:use-module (ice-9 ftw)
#:use-module (ice-9 threads)
#:use-module (haunt site)
#:use-module (haunt config)
#:use-module (haunt ui)
@ -140,4 +141,4 @@ site."
(string-prefix? (string-append cwd "/" build-dir) dir))))
(site-file-filter site)))))
(serve doc-root)))
(serve doc-root #:open-params `(#:port ,port))))

View File

@ -19,6 +19,7 @@
(use-modules (haunt site)
(haunt reader)
(haunt reader skribe)
(haunt reader commonmark)
(haunt asset)
(haunt page)
(haunt post)
@ -33,7 +34,8 @@
(web uri))
(define %releases
'(("0.2" #t)
'(("0.2.1" #t)
("0.2" #t)
("0.1" #f)))
(define (tarball-url version)
@ -115,11 +117,7 @@ culture works available under the " ,%cc-by-sa-link " license.")))))))
" — " ,(date->string* (post-date post)))
(div ,(post-sxml post))))
#:collection-template
(lambda (site title posts prefix)
(define (post-uri post)
(string-append "/" (or prefix "")
(site-post-slug site post) ".html"))
(lambda (site title posts)
`(,(jumbotron
`((p "Haunt is a simple, functional, hackable static site
generator written in Guile Scheme that gives authors the ability to
@ -162,7 +160,7 @@ without needing to upload the generated files to a web server.")
(ul
,@(map (lambda (post)
`(li
(a (@ (href ,(post-uri post)))
(a (@ (href ,(site-post-path site post)))
,(post-ref post 'title)
" — "
,(date->string* (post-date post)))))
@ -217,7 +215,7 @@ the official git repository:")
#:default-metadata
'((author . "David Thompson")
(email . "davet@gnu.org"))
#:readers (list sxml-reader skribe-reader)
#:readers (list sxml-reader skribe-reader commonmark-reader)
#:builders (list (blog #:theme haunt-theme #:collections %collections)
(atom-feed)
(atom-feeds-by-tag)

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Assets</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Atom</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Blog</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Builders</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Building</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Command-line Interface</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -0,0 +1,100 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 2015 David Thompson
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: CommonMark</title>
<meta name="description" content="Haunt Reference Manual: CommonMark">
<meta name="keywords" content="Haunt Reference Manual: CommonMark">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Readers.html#Readers" rel="up" title="Readers">
<link href="Pages.html#Pages" rel="next" title="Pages">
<link href="Skribe.html#Skribe" rel="prev" title="Skribe">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="CommonMark"></a>
<div class="header">
<p>
Previous: <a href="Skribe.html#Skribe" accesskey="p" rel="prev">Skribe</a>, Up: <a href="Readers.html#Readers" accesskey="u" rel="up">Readers</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="CommonMark-1"></a>
<h4 class="subsection">5.3.4 CommonMark</h4>
<div class="example">
<pre class="example">(use-modules (haunt reader commonmark))
</pre></div>
<dl>
<dt><a name="index-commonmark_002dreader"></a>Scheme Procedure: <strong>commonmark-reader</strong></dt>
<dd><p>A reader for posts written in CommonMark, a fully specified variant of
Markdown. Metadata is encoded as <code>key: value</code> pairs, one per line,
at the beginning of the file. A line with the <code>---</code> sentinel marks
the end of the metadata section and the rest of the file is encoded as HTML.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">title: Hello, CommonMark!
date: 2016-08-20 12:00
tags: markdown, commonmark
---
## This is a CommonMark post
CommonMark is a **strongly** defined, *highly* compatible
specification of Markdown, learn more about CommomMark
[here](http://commonmark.org/).
</pre></div>
</dd></dl>
</body>
</html>

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Concept Index</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Contributing</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Downloading</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: GNU Free Documentation License</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Installation</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Introduction</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Invoking haunt build</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Invoking haunt serve</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Pages</title>
@ -24,7 +24,7 @@ Documentation License". -->
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Programming-Interface.html#Programming-Interface" rel="up" title="Programming Interface">
<link href="Assets.html#Assets" rel="next" title="Assets">
<link href="Readers.html#Readers" rel="prev" title="Readers">
<link href="CommonMark.html#CommonMark" rel="prev" title="CommonMark">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Posts</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -124,7 +123,7 @@ metadata association list.
</p></dd></dl>
<dl>
<dt><a name="index-post_002ddata"></a>Scheme Procedure: <strong>post-data</strong> <em><var>post</var></em></dt>
<dt><a name="index-post_002ddate"></a>Scheme Procedure: <strong>post-date</strong> <em><var>post</var></em></dt>
<dd><p>Return the date for <var>post</var>, or <code>%default-date</code> if no date is
specified.
</p></dd></dl>

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Programming Index</title>
@ -45,9 +45,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -72,6 +71,8 @@ Previous: <a href="Concept-Index.html#Concept-Index" accesskey="p" rel="prev">Co
&nbsp;
<a class="summary-letter" href="#Programming-Index_fn_letter-B"><b>B</b></a>
&nbsp;
<a class="summary-letter" href="#Programming-Index_fn_letter-C"><b>C</b></a>
&nbsp;
<a class="summary-letter" href="#Programming-Index_fn_letter-D"><b>D</b></a>
&nbsp;
<a class="summary-letter" href="#Programming-Index_fn_letter-H"><b>H</b></a>
@ -107,28 +108,31 @@ Previous: <a href="Concept-Index.html#Concept-Index" accesskey="p" rel="prev">Co
<tr><th><a name="Programming-Index_fn_letter-B">B</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Blog.html#index-blog"><code>blog</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Blog.html#Blog">Blog</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-C">C</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="CommonMark.html#index-commonmark_002dreader"><code>commonmark-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="CommonMark.html#CommonMark">CommonMark</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-D">D</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Assets.html#index-directory_002dassets"><code>directory-assets</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Assets.html#Assets">Assets</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-H">H</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-html_002dreader"><code>html-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-html_002dreader"><code>html-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-I">I</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Assets.html#index-install_002dasset"><code>install-asset</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Assets.html#Assets">Assets</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-M">M</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Assets.html#index-make_002dasset"><code>make-asset</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Assets.html#Assets">Assets</a></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-make_002dfile_002dextension_002dmatcher"><code>make-file-extension-matcher</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-make_002dfile_002dextension_002dmatcher"><code>make-file-extension-matcher</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td></td><td valign="top"><a href="Pages.html#index-make_002dpage"><code>make-page</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Pages.html#Pages">Pages</a></td></tr>
<tr><td></td><td valign="top"><a href="Posts.html#index-make_002dpost"><code>make-post</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Posts.html#Posts">Posts</a></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-make_002dreader"><code>make-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-make_002dreader"><code>make-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-P">P</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Pages.html#index-page_002dcontents"><code>page-contents</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Pages.html#Pages">Pages</a></td></tr>
<tr><td></td><td valign="top"><a href="Pages.html#index-page_002dfile_002dname"><code>page-file-name</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Pages.html#Pages">Pages</a></td></tr>
<tr><td></td><td valign="top"><a href="Pages.html#index-page_002dwriter"><code>page-writer</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Pages.html#Pages">Pages</a></td></tr>
<tr><td></td><td valign="top"><a href="Pages.html#index-page_003f"><code>page?</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Pages.html#Pages">Pages</a></td></tr>
<tr><td></td><td valign="top"><a href="Posts.html#index-post_002ddata"><code>post-data</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Posts.html#Posts">Posts</a></td></tr>
<tr><td></td><td valign="top"><a href="Posts.html#index-post_002ddate"><code>post-date</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Posts.html#Posts">Posts</a></td></tr>
<tr><td></td><td valign="top"><a href="Posts.html#index-post_002dfile_002dname"><code>post-file-name</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Posts.html#Posts">Posts</a></td></tr>
<tr><td></td><td valign="top"><a href="Posts.html#index-post_002dmetadata"><code>post-metadata</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Posts.html#Posts">Posts</a></td></tr>
<tr><td></td><td valign="top"><a href="Posts.html#index-post_002dref"><code>post-ref</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Posts.html#Posts">Posts</a></td></tr>
@ -139,12 +143,12 @@ Previous: <a href="Concept-Index.html#Concept-Index" accesskey="p" rel="prev">Co
<tr><td></td><td valign="top"><a href="Posts.html#index-posts_002freverse_002dchronological"><code>posts/reverse-chronological</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Posts.html#Posts">Posts</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-R">R</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-read_002dpost"><code>read-post</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-read_002dposts"><code>read-posts</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-reader_002dmatch_003f"><code>reader-match?</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-reader_002dmatcher"><code>reader-matcher</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-reader_002dmatcher-1"><code>reader-matcher</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-reader_003f"><code>reader?</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-read_002dpost"><code>read-post</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-read_002dposts"><code>read-posts</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-reader_002dmatch_003f"><code>reader-match?</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-reader_002dmatcher"><code>reader-matcher</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-reader_002dproc"><code>reader-proc</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-reader_003f"><code>reader?</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-S">S</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Sites.html#index-site"><code>site</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Sites.html#Sites">Sites</a></td></tr>
@ -157,10 +161,12 @@ Previous: <a href="Concept-Index.html#Concept-Index" accesskey="p" rel="prev">Co
<tr><td></td><td valign="top"><a href="Sites.html#index-site_002dreaders"><code>site-readers</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Sites.html#Sites">Sites</a></td></tr>
<tr><td></td><td valign="top"><a href="Sites.html#index-site_002dtitle"><code>site-title</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Sites.html#Sites">Sites</a></td></tr>
<tr><td></td><td valign="top"><a href="Sites.html#index-site_003f"><code>site?</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Sites.html#Sites">Sites</a></td></tr>
<tr><td></td><td valign="top"><a href="Skribe.html#index-skribe_002dreader"><code>skribe-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Skribe.html#Skribe">Skribe</a></td></tr>
<tr><td></td><td valign="top"><a href="Static-Assets.html#index-static_002ddirectory"><code>static-directory</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Static-Assets.html#Static-Assets">Static Assets</a></td></tr>
<tr><td></td><td valign="top"><a href="Readers.html#index-sxml_002dreader"><code>sxml-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Readers.html#Readers">Readers</a></td></tr>
<tr><td></td><td valign="top"><a href="Reader.html#index-sxml_002dreader"><code>sxml-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Reader.html#Reader">Reader</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Programming-Index_fn_letter-T">T</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="Texinfo.html#index-texinfo_002dreader"><code>texinfo-reader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Texinfo.html#Texinfo">Texinfo</a></td></tr>
<tr><td></td><td valign="top"><a href="Blog.html#index-theme"><code>theme</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Blog.html#Blog">Blog</a></td></tr>
<tr><td></td><td valign="top"><a href="Blog.html#index-theme_003f"><code>theme?</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="Blog.html#Blog">Blog</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
@ -175,6 +181,8 @@ Previous: <a href="Concept-Index.html#Concept-Index" accesskey="p" rel="prev">Co
&nbsp;
<a class="summary-letter" href="#Programming-Index_fn_letter-B"><b>B</b></a>
&nbsp;
<a class="summary-letter" href="#Programming-Index_fn_letter-C"><b>C</b></a>
&nbsp;
<a class="summary-letter" href="#Programming-Index_fn_letter-D"><b>D</b></a>
&nbsp;
<a class="summary-letter" href="#Programming-Index_fn_letter-H"><b>H</b></a>

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Programming Interface</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

179
website/manual/Reader.html Normal file
View File

@ -0,0 +1,179 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 2015 David Thompson
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Reader</title>
<meta name="description" content="Haunt Reference Manual: Reader">
<meta name="keywords" content="Haunt Reference Manual: Reader">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Readers.html#Readers" rel="up" title="Readers">
<link href="Texinfo.html#Texinfo" rel="next" title="Texinfo">
<link href="Readers.html#Readers" rel="prev" title="Readers">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="Reader"></a>
<div class="header">
<p>
Next: <a href="Texinfo.html#Texinfo" accesskey="n" rel="next">Texinfo</a>, Up: <a href="Readers.html#Readers" accesskey="u" rel="up">Readers</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Reader-1"></a>
<h4 class="subsection">5.3.1 Reader</h4>
<div class="example">
<pre class="example">(use-modules (haunt reader))
</pre></div>
<p>The purpose of a reader is to translate the markup within a post file
into an SXML tree representing the HTML structure and associate some
metadata with it.
</p>
<dl>
<dt><a name="index-make_002dreader"></a>Scheme Procedure: <strong>make-reader</strong> <em><var>matcher</var> <var>proc</var></em></dt>
<dd><p>Create a new reader. The reader is to be activated when
<var>matcher</var>, a procedure that accepts a file name as its only
argument, returns <code>#t</code>. When a post file matches, the procedure
<var>proc</var>, which also accepts a file name as its only argument, reads
the contents and returns a post object (see <a href="Posts.html#Posts">Posts</a>).
</p></dd></dl>
<dl>
<dt><a name="index-reader_003f"></a>Scheme Procedure: <strong>reader?</strong> <em><var>object</var></em></dt>
<dd><p>Return <code>#t</code> if <var>object</var> is a reader.
</p></dd></dl>
<dl>
<dt><a name="index-reader_002dmatcher"></a>Scheme Procedure: <strong>reader-matcher</strong> <em><var>reader</var></em></dt>
<dd><p>Return the match procedure for <var>reader</var>.
</p></dd></dl>
<dl>
<dt><a name="index-reader_002dproc"></a>Scheme Procedure: <strong>reader-proc</strong> <em><var>reader</var></em></dt>
<dd><p>Return the read procedure for <var>reader</var>.
</p></dd></dl>
<dl>
<dt><a name="index-reader_002dmatch_003f"></a>Scheme Procedure: <strong>reader-match?</strong> <em><var>reader</var> <var>file-name</var></em></dt>
<dd><p>Return <code>#t</code> if <var>file-name</var> is a file supported by
<var>reader</var>.
</p></dd></dl>
<dl>
<dt><a name="index-read_002dpost"></a>Scheme Procedure: <strong>read-post</strong> <em><var>reader</var> <var>file-name</var> [<var>default-metadata</var>]</em></dt>
<dd><p>Read a post object from <var>file-name</var> using <var>reader</var>, merging
its metadata with <var>default-metadata</var>, or the empty list if not
specified.
</p></dd></dl>
<dl>
<dt><a name="index-read_002dposts"></a>Scheme Procedure: <strong>read-posts</strong> <em><var>directory</var> <var>keep?</var> <var>readers</var> [<var>default-metadata</var>]</em></dt>
<dd><p>Read all of the files in <var>directory</var> that match <var>keep?</var> as
post objects. The <var>readers</var> list must contain a matching reader
for every post.
</p></dd></dl>
<dl>
<dt><a name="index-make_002dfile_002dextension_002dmatcher"></a>Scheme Procedure: <strong>make-file-extension-matcher</strong> <em><var>ext</var></em></dt>
<dd><p>Create a procedure that returns <code>#t</code> when a file name ends with
&ldquo;.ext&rdquo;.
</p></dd></dl>
<dl>
<dt><a name="index-sxml_002dreader"></a>Scheme Procedure: <strong>sxml-reader</strong></dt>
<dd><p>A basic reader for posts written as Scheme code that evaluates to an
an association list. The special key <code>content</code> contains the post
body as an SXML tree.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(use-modules (haunt utils))
`((title . &quot;Hello, world!&quot;)
(date . ,(string-&gt;date* &quot;2015-04-10 23:00&quot;))
(tags &quot;foo&quot; &quot;bar&quot;)
(summary . &quot;Just a test&quot;)
(content
((h2 &quot;Hello!&quot;)
(p &quot;This is Haunt. A static site generator for GNU Guile.&quot;))))
</pre></div>
</dd></dl>
<dl>
<dt><a name="index-html_002dreader"></a>Scheme Procedure: <strong>html-reader</strong></dt>
<dd><p>A basic reader for posts written in plain ol&rsquo; HTML. Metadata is
encoded as the <code>key: value</code> pairs, one per line, at the beginning
of the file. A line with the <code>---</code> sentinel marks the end of the
metadata section and the rest of the file is encoded as HTML.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">title: A Foo Walks Into a Bar
date: 2015-04-11 20:00
tags: bar
---
&lt;p&gt;
This is an example using raw HTML, because Guile doesn't have a
Markdown parser.
&lt;/p&gt;
</pre></div>
</dd></dl>
<hr>
<div class="header">
<p>
Next: <a href="Texinfo.html#Texinfo" accesskey="n" rel="next">Texinfo</a>, Up: <a href="Readers.html#Readers" accesskey="u" rel="up">Readers</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Readers</title>
@ -23,7 +23,7 @@ Documentation License". -->
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Programming-Interface.html#Programming-Interface" rel="up" title="Programming Interface">
<link href="Pages.html#Pages" rel="next" title="Pages">
<link href="Reader.html#Reader" rel="next" title="Reader">
<link href="Posts.html#Posts" rel="prev" title="Posts">
<style type="text/css">
<!--
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -67,113 +66,17 @@ Next: <a href="Pages.html#Pages" accesskey="n" rel="next">Pages</a>, Previous: <
<a name="Readers-1"></a>
<h3 class="section">5.3 Readers</h3>
<div class="example">
<pre class="example">(use-modules (haunt reader))
</pre></div>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="Reader.html#Reader" accesskey="1">Reader</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Reader interface and basic readers
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Texinfo.html#Texinfo" accesskey="2">Texinfo</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Texinfo reader
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Skribe.html#Skribe" accesskey="3">Skribe</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Skribe reader
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="CommonMark.html#CommonMark" accesskey="4">CommonMark</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">CommonMark reader
</td></tr>
</table>
<p>The purpose of a reader is to translate the markup within a post file
into an SXML tree representing the HTML structure and associate some
metadata with it.
</p>
<dl>
<dt><a name="index-make_002dreader"></a>Scheme Procedure: <strong>make-reader</strong> <em><var>matcher</var> <var>proc</var></em></dt>
<dd><p>Create a new reader. The reader is to be activated when
<var>matcher</var>, a procedure that accepts a file name as its only
argument, returns <code>#t</code>. When a post file matches, the procedure
<var>proc</var>, which also accepts a file name as its only argument, reads
the contents and returns a post object (see <a href="Posts.html#Posts">Posts</a>).
</p></dd></dl>
<dl>
<dt><a name="index-reader_003f"></a>Scheme Procedure: <strong>reader?</strong> <em><var>object</var></em></dt>
<dd><p>Return <code>#t</code> if <var>object</var> is a reader.
</p></dd></dl>
<dl>
<dt><a name="index-reader_002dmatcher"></a>Scheme Procedure: <strong>reader-matcher</strong> <em><var>reader</var></em></dt>
<dd><p>Return the match procedure for <var>reader</var>.
</p></dd></dl>
<dl>
<dt><a name="index-reader_002dmatcher-1"></a>Scheme Procedure: <strong>reader-matcher</strong> <em><var>reader</var></em></dt>
<dd><p>Return the read procedure for <var>reader</var>.
</p></dd></dl>
<dl>
<dt><a name="index-reader_002dmatch_003f"></a>Scheme Procedure: <strong>reader-match?</strong> <em><var>reader</var> <var>file-name</var></em></dt>
<dd><p>Return <code>#t</code> if <var>file-name</var> is a file supported by
<var>reader</var>.
</p></dd></dl>
<dl>
<dt><a name="index-read_002dpost"></a>Scheme Procedure: <strong>read-post</strong> <em><var>reader</var> <var>file-name</var> [<var>default-metadata</var>]</em></dt>
<dd><p>Read a post object from <var>file-name</var> using <var>reader</var>, merging
its metadata with <var>default-metadata</var>, or the empty list if not
specified.
</p></dd></dl>
<dl>
<dt><a name="index-read_002dposts"></a>Scheme Procedure: <strong>read-posts</strong> <em><var>directory</var> <var>keep?</var> <var>readers</var> [<var>default-metadata</var>]</em></dt>
<dd><p>Read all of the files in <var>directory</var> that match <var>keep?</var> as
post objects. The <var>readers</var> list must contain a matching reader
for every post.
</p></dd></dl>
<dl>
<dt><a name="index-make_002dfile_002dextension_002dmatcher"></a>Scheme Procedure: <strong>make-file-extension-matcher</strong> <em><var>ext</var></em></dt>
<dd><p>Create a procedure that returns <code>#t</code> when a file name ends with
&ldquo;.ext&rdquo;.
</p></dd></dl>
<dl>
<dt><a name="index-sxml_002dreader"></a>Scheme Procedure: <strong>sxml-reader</strong></dt>
<dd><p>A basic reader for posts written as Scheme code that evaluates to an
an association list. The special key <code>content</code> contains the post
body as an SXML tree.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(use-modules (haunt utils))
`((title . &quot;Hello, world!&quot;)
(date . ,(string-&gt;date* &quot;2015-04-10 23:00&quot;))
(tags &quot;foo&quot; &quot;bar&quot;)
(summary . &quot;Just a test&quot;)
(content
((h2 &quot;Hello!&quot;)
(p &quot;This is Haunt. A static site generator for GNU Guile.&quot;))))
</pre></div>
</dd></dl>
<dl>
<dt><a name="index-html_002dreader"></a>Scheme Procedure: <strong>html-reader</strong></dt>
<dd><p>A basic reader for posts written in plain ol&rsquo; HTML. Metadata is
encoded as the <code>key: value</code> pairs, one per line, at the beginning
of the file. A line with the <code>---</code> sentinel marks the end of the
metadata section and the rest of the file is encoded as HTML.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">title: A Foo Walks Into a Bar
date: 2015-04-11 20:00
tags: bar
---
&lt;p&gt;
This is an example using raw HTML, because Guile doesn't have a
Markdown parser.
&lt;/p&gt;
</pre></div>
</dd></dl>
<hr>
<div class="header">
<p>
Next: <a href="Pages.html#Pages" accesskey="n" rel="next">Pages</a>, Previous: <a href="Posts.html#Posts" accesskey="p" rel="prev">Posts</a>, Up: <a href="Programming-Interface.html#Programming-Interface" accesskey="u" rel="up">Programming Interface</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Requirements</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -79,6 +78,8 @@ later
<ul>
<li> <a href="http://www.nongnu.org/guile-reader/">Guile-Reader</a> version 0.6 or
later (for Skribe support)
</li><li> <a href="https://github.com/OrangeShark/guile-commonmark">guile-commonmark</a>
version 0.1 or later (for CommonMark support)
</li></ul>

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Sites</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

104
website/manual/Skribe.html Normal file
View File

@ -0,0 +1,104 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 2015 David Thompson
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Skribe</title>
<meta name="description" content="Haunt Reference Manual: Skribe">
<meta name="keywords" content="Haunt Reference Manual: Skribe">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Readers.html#Readers" rel="up" title="Readers">
<link href="CommonMark.html#CommonMark" rel="next" title="CommonMark">
<link href="Texinfo.html#Texinfo" rel="prev" title="Texinfo">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="Skribe"></a>
<div class="header">
<p>
Next: <a href="CommonMark.html#CommonMark" accesskey="n" rel="next">CommonMark</a>, Previous: <a href="Texinfo.html#Texinfo" accesskey="p" rel="prev">Texinfo</a>, Up: <a href="Readers.html#Readers" accesskey="u" rel="up">Readers</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Skribe-1"></a>
<h4 class="subsection">5.3.3 Skribe</h4>
<div class="example">
<pre class="example">(use-modules (haunt reader skribe))
</pre></div>
<dl>
<dt><a name="index-skribe_002dreader"></a>Scheme Procedure: <strong>skribe-reader</strong></dt>
<dd><p>A reader for posts written in Skribe, a markup language with the full power
of Scheme. Skribe posts are created with the <code>post</code> expression with
metadata encoded as <code>:key expression</code> pairs at the beginning of the
<code>post</code> expression. After the metadata section, the rest of the <code>post</code>
expression is encoded as HTML.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(post
:title &quot;Hello, Skribe!&quot;
:date (make-date* 2016 08 20 12 00)
:tags '(&quot;skribe&quot; &quot;foo&quot; &quot;baz&quot;)
(h2 [This is a Skribe post])
(p [Skribe is a ,(em [really]) cool document authoring format
that provides all the power of Scheme whilst giving the user
a means to write literal text without stuffing it into a
string literal. If this sort of thing suits you, be sure to
check out ,(anchor &quot;Skribilo&quot;
&quot;http://www.nongnu.org/skribilo/&quot;), too.]))
</pre></div>
</dd></dl>
</body>
</html>

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Static Assets</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

101
website/manual/Texinfo.html Normal file
View File

@ -0,0 +1,101 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 2015 David Thompson
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Texinfo</title>
<meta name="description" content="Haunt Reference Manual: Texinfo">
<meta name="keywords" content="Haunt Reference Manual: Texinfo">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Readers.html#Readers" rel="up" title="Readers">
<link href="Skribe.html#Skribe" rel="next" title="Skribe">
<link href="Reader.html#Reader" rel="prev" title="Reader">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="Texinfo"></a>
<div class="header">
<p>
Next: <a href="Skribe.html#Skribe" accesskey="n" rel="next">Skribe</a>, Previous: <a href="Reader.html#Reader" accesskey="p" rel="prev">Reader</a>, Up: <a href="Readers.html#Readers" accesskey="u" rel="up">Readers</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Texinfo-1"></a>
<h4 class="subsection">5.3.2 Texinfo</h4>
<div class="example">
<pre class="example">(use-modules (haunt reader texinfo))
</pre></div>
<dl>
<dt><a name="index-texinfo_002dreader"></a>Scheme Procedure: <strong>texinfo-reader</strong></dt>
<dd><p>A reader for posts written in texinfo, the official documentation format
of the GNU project. Metadata is encoded as <code>key: value</code> pairs, one
per line, at the beginning of the file. A line with the <code>---</code>
sentinel marks the end of the metadata section and the rest of the file
is encoded as HTML.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">title: Hello, Texi!
date: 2016-08-20 12:00
tags: texinfo, foo
---
@emph{Texinfo} is the official documentation format of the
@url{http://www.gnu.org/, GNU project}. It was invented by Richard
Stallman and Bob Chassell many years ago, loosely based on Brian
Reid's Scribe and other formatting languages of the time. It is
used by many non-GNU projects as well.
</pre></div>
</dd></dl>
</body>
</html>

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Tutorial</title>
@ -46,9 +46,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -9,7 +9,7 @@ any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Top</title>
@ -45,9 +45,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -86,7 +85,13 @@ ul.no-bullet {list-style: none}
<ul class="no-bullet">
<li><a name="toc-Sites-1" href="Sites.html#Sites">5.1 Sites</a></li>
<li><a name="toc-Posts-1" href="Posts.html#Posts">5.2 Posts</a></li>
<li><a name="toc-Readers-1" href="Readers.html#Readers">5.3 Readers</a></li>
<li><a name="toc-Readers-1" href="Readers.html#Readers">5.3 Readers</a>
<ul class="no-bullet">
<li><a name="toc-Reader-1" href="Reader.html#Reader">5.3.1 Reader</a></li>
<li><a name="toc-Texinfo-1" href="Texinfo.html#Texinfo">5.3.2 Texinfo</a></li>
<li><a name="toc-Skribe-1" href="Skribe.html#Skribe">5.3.3 Skribe</a></li>
<li><a name="toc-CommonMark-1" href="CommonMark.html#CommonMark">5.3.4 CommonMark</a></li>
</ul></li>
<li><a name="toc-Pages-1" href="Pages.html#Pages">5.4 Pages</a></li>
<li><a name="toc-Assets-1" href="Assets.html#Assets">5.5 Assets</a></li>
<li><a name="toc-Builders-1" href="Builders.html#Builders">5.6 Builders</a>
@ -113,7 +118,7 @@ Next: <a href="Introduction.html#Introduction" accesskey="n" rel="next">Introduc
<a name="Haunt"></a>
<h1 class="top">Haunt</h1>
<p>This document describes Haunt version 0.2, an extensible,
<p>This document describes Haunt version 0.2.1, an extensible,
functional static site generator.
</p>
<table class="menu" border="0" cellspacing="0">
@ -130,6 +135,7 @@ functional static site generator.
<tr><td align="left" valign="top">&bull; <a href="Contributing.html#Contributing" accesskey="6">Contributing</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to contribute to Haunt.
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
</pre></th></tr><tr><td align="left" valign="top">&bull; <a href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" accesskey="7">GNU Free Documentation License</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The license of this manual.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Concept-Index.html#Concept-Index" accesskey="8">Concept Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Concepts.
@ -137,6 +143,7 @@ functional static site generator.
<tr><td align="left" valign="top">&bull; <a href="Programming-Index.html#Programming-Index" accesskey="9">Programming Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Data types, procedures, syntax, and variables.
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
</pre></th></tr><tr><th colspan="3" align="left" valign="top"><pre class="menu-comment"> &mdash; The Detailed Node Listing &mdash;
Installation
@ -148,6 +155,7 @@ Installation
<tr><td align="left" valign="top">&bull; <a href="Building.html#Building">Building</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Building from source code.
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
</pre></th></tr></table>
<hr>

View File

@ -0,0 +1,24 @@
title: Haunt 0.2.1 released
date: 2017-01-23 08:00:00
tags: release
summary: Haunt 0.2.1 released
---
I am pleased to announce the release of Haunt version 0.2.1. This
release features a new reader for the
[Markdown](http://commonmark.org/) format via
[guile-commonmark](https://github.com/OrangeShark/guile-commonmark) as
well as small improvements to the Atom feed generator and
documentation.
The new Commonmark reader can be found in the `(haunt reader
commonmark)` module.
Thank you to Erik Edrosa, Ludovic Courtès, and Vladimir Zhbanov for
contributing to this release.
Source tarball: [haunt-0.2.1.tar.gz](https://files.dthompson.us/haunt/haunt-0.2.1.tar.gz.sig)
GPG signature [haunt-0.2.1.tar.gz.sig](https://files.dthompson.us/haunt/haunt-0.2.1.tar.gz.sig)
Happy haunting!