Compare commits

..

No commits in common. "master" and "v0.2.1" have entirely different histories.

47 changed files with 285 additions and 950 deletions

1
.gitignore vendored
View File

@ -13,7 +13,6 @@ 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)/site-ccache
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/ccache
bin_SCRIPTS = \
scripts/haunt
@ -54,7 +54,6 @@ 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 \
@ -104,8 +103,3 @@ 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/RSS feed generation
- Easy blog and Atom feed generation
- Supports any markup language that can be parsed to SXML
- Simple development server
- Purely functional build process

3
THANKS
View File

@ -1,5 +1,2 @@
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.4)
AC_INIT(Haunt, 0.2.1)
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([3.0 2.2 2.0])
GUILE_PKG([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 under Releases
in @url{https://dthompson.us/projects/haunt.html, Haunt's website},
along with their associated checksums.
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.
@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,7 +35,6 @@
(gnu packages)
(gnu packages autotools)
(gnu packages guile)
(gnu packages guile-xyz)
(gnu packages pkg-config)
(gnu packages texinfo))
@ -62,7 +61,7 @@
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
(inputs
`(("guile" ,guile-2.2)))
`(("guile" ,guile-2.0)))
(propagated-inputs
`(("guile-commonmark" ,guile-commonmark)
("guile-reader" ,guile-reader)))

View File

@ -24,7 +24,6 @@
;;; 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)
@ -34,138 +33,39 @@
#:use-module (haunt page)
#:use-module (haunt utils)
#:use-module (haunt html)
#: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
#:export (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 RFC-3339 formatted string."
(date->string date "~Y-~m-~dT~H:~M:~SZ"))
"Convert date to ISO-8601 formatted string."
(date->string date "~4"))
(define* (post->atom-entry site post)
(define* (post->atom-entry site post #:key (blog-prefix ""))
"Convert POST into an Atom <entry> XML node."
(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)))))
`(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)))))
(define* (atom-feed #:key
(file-name "feed.xml")
(subtitle "Recent Posts")
(filter posts/reverse-chronological)
(max-entries 20))
(max-entries 20)
(blog-prefix ""))
"Return a builder procedure that renders a list of posts as an Atom
feed. All arguments are optional:
@ -174,28 +74,25 @@ 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)
(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*))))
(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*)))
(define* (atom-feeds-by-tag #:key
(prefix "feeds/tags")
(filter posts/reverse-chronological)
(max-entries 20))
(max-entries 20)
(blog-prefix ""))
"Return a builder procedure that renders an atom feed for every tag
used in a post. All arguments are optional:
@ -209,6 +106,7 @@ 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)
#:max-entries max-entries
#:blog-prefix blog-prefix)
site posts)))
tag-groups))))

View File

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

View File

@ -1,104 +0,0 @@
;;; 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,6 +57,7 @@
(alist->hash-table
'((#\" . "quot")
(#\& . "amp")
(#\' . "apos")
(#\< . "lt")
(#\> . "gt"))))

View File

@ -36,14 +36,13 @@
post-sxml
post-metadata
post-ref
post-ref-all
post-slug
%default-date
post-date
posts/reverse-chronological
posts/group-by-tag
register-metadata-parser!
register-metdata-parser!
parse-metadata
read-metadata-headers))
@ -58,13 +57,6 @@
"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,17 +105,8 @@ post."
(define (read-html-post port)
(values (read-metadata-headers port)
(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))))))))))
(match (xml->sxml port)
(('*TOP* sxml) sxml))))
(define html-reader
(make-reader (make-file-extension-matcher "html")

View File

@ -539,10 +539,16 @@
("vrml" . x-world/x-vrml)
("wrl" . x-world/x-vrml))))
(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 %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 (mime-type file-name)
"Guess the MIME type for FILE-NAME based upon its file extension."

View File

@ -33,37 +33,30 @@
#: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-path
site-post-relative-path
site-post-url
site-post-slug
build-site
make-file-filter
default-file-filter))
(define-record-type <site>
(make-site title domain scheme posts-directory posts-output-directory file-filter
build-directory default-metadata make-slug readers builders)
(make-site title domain posts-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)
@ -74,9 +67,7 @@
(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 '())
@ -86,10 +77,7 @@
"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.
@ -99,33 +87,13 @@ 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 scheme posts-directory posts-output-directory file-filter
build-directory default-metadata make-slug readers builders))
(make-site title domain posts-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,9 +29,7 @@
#:export (post
p blockquote em
h1 h2 h3 h4 h5 h6
section
nav aside
h1 h2 h3 h4
code pre strong
ul ol li dl dt dd
anchor
@ -62,9 +60,7 @@ contents from METADATA+SXML."
em strong
code samp pre kbd var
cite dfn abbr
h1 h2 h3 h4 h5 h6
section
nav aside
h1 h2 h3 h4
ul ol li dl dt dd)
(define (anchor text uri)

View File

@ -28,7 +28,6 @@
#: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)
@ -141,4 +140,4 @@ site."
(string-prefix? (string-append cwd "/" build-dir) dir))))
(site-file-filter site)))))
(serve doc-root #:open-params `(#:port ,port))))
(serve doc-root)))

View File

@ -19,7 +19,6 @@
(use-modules (haunt site)
(haunt reader)
(haunt reader skribe)
(haunt reader commonmark)
(haunt asset)
(haunt page)
(haunt post)
@ -34,8 +33,7 @@
(web uri))
(define %releases
'(("0.2.1" #t)
("0.2" #t)
'(("0.2" #t)
("0.1" #f)))
(define (tarball-url version)
@ -117,7 +115,11 @@ 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)
(lambda (site title posts prefix)
(define (post-uri post)
(string-append "/" (or prefix "")
(site-post-slug site post) ".html"))
`(,(jumbotron
`((p "Haunt is a simple, functional, hackable static site
generator written in Guile Scheme that gives authors the ability to
@ -160,7 +162,7 @@ without needing to upload the generated files to a web server.")
(ul
,@(map (lambda (post)
`(li
(a (@ (href ,(site-post-path site post)))
(a (@ (href ,(post-uri post)))
,(post-ref post 'title)
" — "
,(date->string* (post-date post)))))
@ -215,7 +217,7 @@ the official git repository:")
#:default-metadata
'((author . "David Thompson")
(email . "davet@gnu.org"))
#:readers (list sxml-reader skribe-reader commonmark-reader)
#:readers (list sxml-reader skribe-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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Assets</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Atom</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Blog</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Builders</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Building</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Command-line Interface</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -1,100 +0,0 @@
<!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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Concept Index</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Contributing</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Downloading</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: GNU Free Documentation License</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Installation</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Introduction</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Invoking haunt build</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Invoking haunt serve</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, 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="CommonMark.html#CommonMark" rel="prev" title="CommonMark">
<link href="Readers.html#Readers" rel="prev" title="Readers">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Posts</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -123,7 +124,7 @@ metadata association list.
</p></dd></dl>
<dl>
<dt><a name="index-post_002ddate"></a>Scheme Procedure: <strong>post-date</strong> <em><var>post</var></em></dt>
<dt><a name="index-post_002ddata"></a>Scheme Procedure: <strong>post-data</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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Programming Index</title>
@ -45,8 +45,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -71,8 +72,6 @@ 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>
@ -108,31 +107,28 @@ 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="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></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 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="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="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="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="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></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 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_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_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_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>
@ -143,12 +139,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="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></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 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>
@ -161,12 +157,10 @@ 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="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></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 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>
@ -181,8 +175,6 @@ 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Programming Interface</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -1,179 +0,0 @@
<!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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, 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="Reader.html#Reader" rel="next" title="Reader">
<link href="Pages.html#Pages" rel="next" title="Pages">
<link href="Posts.html#Posts" rel="prev" title="Posts">
<style type="text/css">
<!--
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -66,17 +67,113 @@ 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>
<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>
<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_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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Requirements</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -78,8 +79,6 @@ 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Sites</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -1,104 +0,0 @@
<!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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Static Assets</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->

View File

@ -1,101 +0,0 @@
<!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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Tutorial</title>
@ -46,8 +46,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; 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.3, http://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Haunt Reference Manual: Top</title>
@ -45,8 +45,9 @@ 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: initial; font-weight: normal}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
@ -85,13 +86,7 @@ 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>
<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-Readers-1" href="Readers.html#Readers">5.3 Readers</a></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>
@ -118,7 +113,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.1, an extensible,
<p>This document describes Haunt version 0.2, an extensible,
functional static site generator.
</p>
<table class="menu" border="0" cellspacing="0">
@ -135,7 +130,6 @@ 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.
@ -143,7 +137,6 @@ 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
@ -155,7 +148,6 @@ 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

@ -1,24 +0,0 @@
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!