Next: , Up: Programming Interface   [Contents][Index]

5.1 Sites

(use-modules (haunt site))

A site object defines all of the properties for a Haunt website: The site name, domain name, where blog posts are found, what post formats are understood, which procedures are used to build the site, where the output files are written to, etc.

Procedure: site [#:title "This Place is Haunted"] [#:domain ""] [#:posts-directory "posts"] [#:file-filter default-file-filter] [#:build-directory "site"] [#:default-metadata '()] [#:make-slug post-slug] [#:readers '()] [#:builders '()] [#:publishers '()]

Create a new site object. All arguments are optional:


The name of the site.


The directory where posts are found.


A predicate procedure that returns #f when a post file should be ignored, and #t otherwise. Emacs temporary files are ignored by default.


The directory that generated pages are stored in.


An alist of arbitrary default metadata for posts whose keys are symbols.


A procedure generating a file name slug from a post.


A list of reader objects for processing posts.


A list of procedures for building pages from posts.


A list of publisher objects for upload site contents to a remote location

Procedure: site? obj

Return #t if obj is a site object.

Procedure: site-title site

Return the title of site.

Procedure: site-domain site

Return the domain of site.

Procedure: site-posts-directory site

Return the posts directory for site.

Procedure: site-file-filter site

Return the file filter procedure for site.

Procedure: site-build-directory site

Return the build directory of site.

Procedure: site-make-slug site

Return the slug constructor for site.

Procedure: site-readers site

Return the list of reader procedures for site.

Procedure: site-builders site

Return the list of builder procedures for site.

Procedure: site-publishers site

Return the list of publisher objects for upload site contents to a remote location.

Next: Posts, Up: Programming Interface   [Contents][Index]