haunt.git
3 years agopost: Allow dashes in slugs.
David Thompson [Sat, 2 Apr 2016 19:56:19 +0000 (15:56 -0400)] 
post: Allow dashes in slugs.

* haunt/post.scm (char-set:slug): New variable.
(post-slug): Use slug char set.

3 years agoskribe: utils: Export ol.
David Thompson [Sat, 2 Apr 2016 19:55:47 +0000 (15:55 -0400)] 
skribe: utils: Export ol.

* haunt/skribe/utils.scm: Export ol.

3 years agoguix: Add pkg-config to environment.
David Thompson [Tue, 16 Feb 2016 00:57:41 +0000 (19:57 -0500)] 
guix: Add pkg-config to environment.

3 years agobuild: Allow building with Guile 2.2.
David Thompson [Tue, 16 Feb 2016 00:56:41 +0000 (19:56 -0500)] 
build: Allow building with Guile 2.2.

* Makefile.am (moddir, goddir): Remove hardcoded "2.0".
* configure.ac: Check to 2.2 as well.

3 years agoskribe: Add copyright information for Ludovic Courtès.
Christopher Allan Webber [Tue, 15 Dec 2015 05:05:50 +0000 (23:05 -0600)] 
skribe: Add copyright information for Ludovic Courtès.

Trace origin back to Skribilo.

* haunt/skribe.scm: Added comments and copyright headers.

3 years agodoc: Add support for 'install-info'.
Mathieu Lirzin [Thu, 12 Nov 2015 22:05:17 +0000 (23:05 +0100)] 
doc: Add support for 'install-info'.

* doc/haunt.texi: Use '@dircategory' and '@direntry'.

3 years agobuild: Don't build dvi docs.
David Thompson [Sun, 6 Dec 2015 17:21:21 +0000 (12:21 -0500)] 
build: Don't build dvi docs.

3 years agoreader: texinfo: Remove unused import.
David Thompson [Wed, 11 Nov 2015 02:38:19 +0000 (21:38 -0500)] 
reader: texinfo: Remove unused import.

3 years agoRenamed README.md to README.
David Thompson [Wed, 11 Nov 2015 02:37:38 +0000 (21:37 -0500)] 
Renamed README.md to README.

3 years agobuild: Declare a dependency for the manual.
Mathieu Lirzin [Tue, 10 Nov 2015 15:03:43 +0000 (16:03 +0100)] 
build: Declare a dependency for the manual.

This fixes 'make distcheck' failure.

* Makefile.am (doc_haunt_TEXINFOS): New variable.

3 years agobuild: Fix all the Guix development package references.
Mathieu Lirzin [Tue, 10 Nov 2015 14:53:11 +0000 (15:53 +0100)] 
build: Fix all the Guix development package references.

* Makefile.am (EXTRA_DIST): Use 'guix.scm' instead of the obsolete file
name 'package.scm'.
* example/posts/baz.skr: Likewise.

3 years agoreader: Add texinfo support.
David Thompson [Fri, 16 Oct 2015 02:50:18 +0000 (22:50 -0400)] 
reader: Add texinfo support.

* haunt/reader/texinfo.scm: New file.
* Makefile.am (SOURCES): Add it.
* example/haunt.scm: Activate texinfo reader.
* example/posts/quux.scm: New file.

3 years agopost: Add read-metadata-headers procedure.
David Thompson [Fri, 16 Oct 2015 02:46:30 +0000 (22:46 -0400)] 
post: Add read-metadata-headers procedure.

* haunt/post.scm (read-metadata-headers): New procedure.
* haunt/reader.scm (read-html-post): Reimplement using
  'read-metadata-headers'.
* tests/post.scm (%tzoffset): New variable.
  ("read-metadata-headers"): New test.

3 years agotests: Add post tests.
David Thompson [Fri, 16 Oct 2015 02:37:40 +0000 (22:37 -0400)] 
tests: Add post tests.

* tests/post.scm: New file.
* Makefile.am (TESTS): Add it.

3 years agoBump version to 0.2.
David Thompson [Fri, 16 Oct 2015 01:09:14 +0000 (21:09 -0400)] 
Bump version to 0.2.

3 years agoAdd beginnings of a reference manual.
David Thompson [Fri, 16 Oct 2015 01:05:11 +0000 (21:05 -0400)] 
Add beginnings of a reference manual.

* Makefile.am (info_TEXINFOS): New variable.
* doc/haunt.texi: New file.
* doc/fdl-1.3.texi: New file.
* guix.scm [native-inputs]: Add texinfo.

3 years agoIgnore build-aux/test-driver.
David Thompson [Thu, 15 Oct 2015 21:10:39 +0000 (17:10 -0400)] 
Ignore build-aux/test-driver.

Generated by Automake.  No need to check it into the repo.

3 years agoutils: Clean up and add tests.
David Thompson [Wed, 14 Oct 2015 14:44:00 +0000 (10:44 -0400)] 
utils: Clean up and add tests.

* haunt/utils.scm (flat-map, string-split-at): Add docstring.
  (file-name-components): Adjust slightly to handle "/".
  (join-file-name-components): Use prefix string join grammar.
  (absolute-file-name): Add docstring.
* test-env.in: New file.
* tests/utils.scm: New file.
* Makefile.am (TESTS, TEST_EXTENSIONS, SCM_LOG_COMPILER,
  AM_SCM_LOG_FLAGS): New variables.
* configure.ac: Add test-env pre-processed file.
* build-aux/test-driver: New file.

3 years agoUpdate Guix development package.
David Thompson [Tue, 13 Oct 2015 00:08:49 +0000 (20:08 -0400)] 
Update Guix development package.

3 years agoAdd support for Skribe document format.
David Thompson [Mon, 12 Oct 2015 23:32:05 +0000 (19:32 -0400)] 
Add support for Skribe document format.

* haunt/skribe.scm: New file.
* haunt/skribe/utils.scm: New file.
* haunt/reader/skribe.scm: New file.
* configure.ac: Check for guile-reader.
* Makefile.am (SOURCES): Add Skribe modules when guile-reader is
  available.
* example/haunt.scm: Include Skribe reader.
* example/posts/baz.skr: New file.
* README.md ("Requirements"): Mention guile-reader as optional dependency.

3 years agoutils: Add make-user-module.
David Thompson [Mon, 12 Oct 2015 23:29:57 +0000 (19:29 -0400)] 
utils: Add make-user-module.

* haunt/utils.scm (make-user-module): New procedure.

3 years agoui: Add CWD to Guile load path.
David Thompson [Mon, 12 Oct 2015 23:05:50 +0000 (19:05 -0400)] 
ui: Add CWD to Guile load path.

* haunt/ui.scm (haunt-main): Add CWD to Guile load path.

3 years agobuilder: blog: Export render-post and render-collection.
David Thompson [Thu, 8 Oct 2015 21:40:05 +0000 (17:40 -0400)] 
builder: blog: Export render-post and render-collection.

* haunt/builder/blog.scm: Export render-post and render-collection.

3 years agohtml: Remove 'raw' element type.
David Thompson [Sat, 3 Oct 2015 00:47:37 +0000 (20:47 -0400)] 
html: Remove 'raw' element type.

* haunt/html.scm (sxml->html): Remove 'raw' element renderer.
* haunt/reader.scm (read-html-post): Parse to SXML, rather than reading
  a raw string.

3 years agobuilder: blog: Export "theme-collection-template".
Ricardo Wurmus [Fri, 4 Sep 2015 06:37:08 +0000 (08:37 +0200)] 
builder: blog: Export "theme-collection-template".

* haunt/builder/blog.scm: Export "theme-collection-template", not
  "theme-list-template".

3 years agoREADME: Add examples section.
David Thompson [Tue, 18 Aug 2015 13:06:31 +0000 (09:06 -0400)] 
README: Add examples section.

3 years agoREADME: Explain the pre-inst-env script.
David Thompson [Tue, 18 Aug 2015 13:06:16 +0000 (09:06 -0400)] 
README: Explain the pre-inst-env script.

3 years agoAdd package.scm to release tarballs.
David Thompson [Wed, 12 Aug 2015 12:36:10 +0000 (08:36 -0400)] 
Add package.scm to release tarballs.

3 years agowebsite: Add license information to home page.
David Thompson [Mon, 10 Aug 2015 13:05:20 +0000 (09:05 -0400)] 
website: Add license information to home page.

* website/haunt.scm (haunt-theme): Add "License" section to index page.

3 years agoInclude example and website directories in release tarballs.
David Thompson [Mon, 10 Aug 2015 13:04:42 +0000 (09:04 -0400)] 
Include example and website directories in release tarballs.

3 years agoInclude README.md in future release tarballs.
David Thompson [Mon, 10 Aug 2015 12:38:33 +0000 (08:38 -0400)] 
Include README.md in future release tarballs.

Thanks to Ben Sturmfels for pointing out that it was missing.

3 years agowebsite: Add Piwik analytics.
David Thompson [Sun, 9 Aug 2015 14:21:53 +0000 (10:21 -0400)] 
website: Add Piwik analytics.

* website/haunt.scm (%piwik-code): New variable.
  (haunt-theme): Include Piwik JS on all pages.
* website/js/piwik.js: New file.

3 years agoAdd THANKS file.
David Thompson [Sun, 9 Aug 2015 14:13:18 +0000 (10:13 -0400)] 
Add THANKS file.

3 years agoREADME: Fix Guile version requirements.
David Thompson [Sun, 9 Aug 2015 14:11:22 +0000 (10:11 -0400)] 
README: Fix Guile version requirements.

Thanks to Ben Sturmfels for pointing it out.

3 years agowebsite: Add real SHA1 checksum for 0.1 release.
David Thompson [Sat, 8 Aug 2015 14:03:11 +0000 (10:03 -0400)] 
website: Add real SHA1 checksum for 0.1 release.

3 years agoUpdate Guix development package. v0.1
David Thompson [Sat, 8 Aug 2015 13:58:59 +0000 (09:58 -0400)] 
Update Guix development package.

3 years agoAdd scripts/haunt to bin directory.
David Thompson [Sat, 8 Aug 2015 13:50:31 +0000 (09:50 -0400)] 
Add scripts/haunt to bin directory.

* Makefile.am (bin_SCRIPTS): New variable.

3 years agoAdd website.
David Thompson [Sat, 8 Aug 2015 13:42:24 +0000 (09:42 -0400)] 
Add website.

3 years agoUpdate Guix package metadata.
David Thompson [Sat, 8 Aug 2015 13:28:02 +0000 (09:28 -0400)] 
Update Guix package metadata.

3 years agoIgnore gzipped tarballs.
David Thompson [Sat, 8 Aug 2015 13:19:26 +0000 (09:19 -0400)] 
Ignore gzipped tarballs.

3 years agoui: serve: Fix auto-rebuilding logic.
David Thompson [Sat, 8 Aug 2015 13:11:31 +0000 (09:11 -0400)] 
ui: serve: Fix auto-rebuilding logic.

* haunt/ui/serve.scm (watch): Remove 'ignore-dirs' argument.  Add
  'check-file?' and 'check-dir?' arguments.
  (haunt-serve): Use new 'watch' procedure.

3 years agoblog: Export with-layout.
David Thompson [Sat, 8 Aug 2015 04:44:33 +0000 (00:44 -0400)] 
blog: Export with-layout.

3 years agoasset: Filter out assets that do not pass the site file filter.
David Thompson [Sat, 8 Aug 2015 04:42:12 +0000 (00:42 -0400)] 
asset: Filter out assets that do not pass the site file filter.

* haunt/asset.scm (directory-assets): Add 'keep?' argument.
  (static-directory): Use site file filter.

3 years agosite: Change post-filter to file-filter.
David Thompson [Sat, 8 Aug 2015 04:34:05 +0000 (00:34 -0400)] 
site: Change post-filter to file-filter.

Genericized name because the predicate procedure may be used on any
file, not just posts.

* haunt/site.scm (<site>)[post-filter]: Delete.
  [file-filter]: New field.
  (site): Replace #:post-filter with #:file-filter.
  (build-site): Use 'site-post-filter'.
  (make-file-name-filter): Delete.
  (make-file-filter): New procedure.
  (default-file-name-filter): Delete.
  (default-file-filter): New procedure.
* haunt/reader.scm (read-posts): Flip predicate around.

3 years agoexample: Remove unnecessary module import.
David Thompson [Thu, 6 Aug 2015 12:59:44 +0000 (08:59 -0400)] 
example: Remove unnecessary module import.

3 years agobuilder: blog: Add concept of "collections".
David Thompson [Thu, 6 Aug 2015 12:55:20 +0000 (08:55 -0400)] 
builder: blog: Add concept of "collections".

Rather than having a hardcoded index page, a blog now accepts a variable
number of "collection" tuples that describe the page title, file name,
and the filter procedure for the posts that will appear on that page.

* haunt/builder/blog.scm (<theme>) [list-template]: Delete.
  [collection-template]: New field.
  (theme-list-template): Delete.
  (theme-collection-template): New accessor.
  (make-theme): Replace #:list-template with #:collection-template.
  (render-list): Delete.
  (render-collection): New procedure.
  (ugly-theme): Use #:collection-template argument.
  (blog): Add #:collections argument.

3 years agobuilder: blog: Export date->string*.
David Thompson [Wed, 5 Aug 2015 22:17:49 +0000 (18:17 -0400)] 
builder: blog: Export date->string*.

* haunt/builder/blog.scm: Export date->string*.

3 years agosite: Don't crash if there is no posts directory.
David Thompson [Wed, 5 Aug 2015 22:17:11 +0000 (18:17 -0400)] 
site: Don't crash if there is no posts directory.

* haunt/site.scm (build-site): Test for the existence of posts
  directory.

3 years agosite: Update default file filter.
David Thompson [Wed, 5 Aug 2015 22:16:10 +0000 (18:16 -0400)] 
site: Update default file filter.

* haunt/site.scm (default-file-filter): Ignore files that begin with "."
  or "#".

3 years agoui: serve: Add --watch option.
David Thompson [Tue, 4 Aug 2015 03:14:09 +0000 (23:14 -0400)] 
ui: serve: Add --watch option.

* haunt/ui/serve.scm (show-help): Add help text for --watch.
  (%options): Add --watch option.
  (watch): New procedure.
  (haunt-serve): DTRT when --watch is specified.

3 years agosite: Add a way to ignore post files that match a pattern.
David Thompson [Tue, 4 Aug 2015 03:09:31 +0000 (23:09 -0400)] 
site: Add a way to ignore post files that match a pattern.

This allows one to ignore files that would otherwise match a reader's
file extension, such as an Emacs temporary file like ".#foo.html".

* haunt/site.scm (<site>)[post-filter]: New field.
  (site-posts-filter): New accessor.
  (site): Add #:post-filter argument.
  (build-site): Pass post filter procedure to 'read-posts'.
  (make-file-name-filter, default-file-name-filter): New procedures.
* haunt/reader.scm (read-posts): Add 'ignore?' argument.

3 years agosite: Fix procedure name in doc string.
Ricardo Wurmus [Tue, 28 Jul 2015 07:22:39 +0000 (09:22 +0200)] 
site: Fix procedure name in doc string.

* haunt/site.scm (site): Change "POST-SLUG" to "MAKE-SLUG" in doc
  string.

3 years agosite: Add site-wide slug procedure setting.
Ricardo Wurmus [Mon, 27 Jul 2015 19:05:30 +0000 (21:05 +0200)] 
site: Add site-wide slug procedure setting.

Co-Authored-By: David Thompson <davet@gnu.org>
* haunt/site.scm (<site>)[make-slug]: New field.
  (site-make-slug, site-post-slug): New procedures.
  (site): Add #:make-slug keyword argument.
* haunt/builder/blog.scm (render-list): Pass site to theme's list
  template.
  (ugly-theme): Add 'site' argument to #:list-template procedure.
  (blog): Use 'site-post-slug'.
* haunt/builder/atom.scm (atom-feed, post->atom-entry): Likewise.

3 years agoexample: Add image asset.
David Thompson [Mon, 27 Jul 2015 12:54:30 +0000 (08:54 -0400)] 
example: Add image asset.

* example/haunt.scm: Add static directory builder.
* example/images/guile-banner.small.png: New file.
* example/posts/foo.sxml: Render Guile banner image.

3 years agoweb-server: Bypass response sanitization for static files.
David Thompson [Mon, 27 Jul 2015 12:48:29 +0000 (08:48 -0400)] 
web-server: Bypass response sanitization for static files.

Just copy the raw bytes.

* haunt/serve/web-server.scm (dump-file): Delete.
  (render-file): Return a bytevector instead of a writer procedure.

3 years agoRemove code that was accidentally committed.
David Thompson [Mon, 27 Jul 2015 12:24:49 +0000 (08:24 -0400)] 
Remove code that was accidentally committed.

3 years agosite: Display unicode arrow when printing asset copy actions.
David Thompson [Mon, 27 Jul 2015 03:08:24 +0000 (23:08 -0400)] 
site: Display unicode arrow when printing asset copy actions.

* haunt/site.scm (build-site): Replace '->' with '→'.

3 years agoui: Set default locale for all commands.
David Thompson [Mon, 27 Jul 2015 03:07:39 +0000 (23:07 -0400)] 
ui: Set default locale for all commands.

* haunt/ui.scm (haunt-main): Set LC_ALL.

3 years agoutils: file-name-components: Handle empty string.
David Thompson [Mon, 27 Jul 2015 03:06:28 +0000 (23:06 -0400)] 
utils: file-name-components: Handle empty string.

* haunt/utils.scm (file-name-components): Return the empty list when
  given the empty string.

3 years agoasset: Add brief documentation.
David Thompson [Mon, 27 Jul 2015 02:47:14 +0000 (22:47 -0400)] 
asset: Add brief documentation.

* haunt/asset.scm: Add introductory comment.
* README.md (Example Configuration): Add 'directory-assets' example.

3 years agobuilder: Add assets builder.
David Thompson [Mon, 27 Jul 2015 03:09:43 +0000 (23:09 -0400)] 
builder: Add assets builder.

* haunt/builder/assets.scm: New file.
* Makefile.am (SOURCES): Add it.

3 years agoRename (haunt build html) to (haunt html).
David Thompson [Mon, 27 Jul 2015 02:35:29 +0000 (22:35 -0400)] 
Rename (haunt build html) to (haunt html).

* haunt/build/html.scm: Delete it.
* haunt/html.scm: New file.
* Makefile.am (SOURCES): Remove old file.  Add new file.
* haunt/builder/atom.scm: Use new module.
* haunt/builder/blog.scm: Likewise.
* haunt/ui/serve.scm: Likewise.

3 years agohtml: Add punctuation to comment.
David Thompson [Mon, 27 Jul 2015 02:29:57 +0000 (22:29 -0400)] 
html: Add punctuation to comment.

3 years agohtml: Remove gratuitous escape codes.
David Thompson [Mon, 27 Jul 2015 02:27:24 +0000 (22:27 -0400)] 
html: Remove gratuitous escape codes.

UTF-8 encoded HTML pages are much better than maintaining a giant lookup
table.

* haunt/build/html.scm (%escape-chars): Remove all but the absolutely
  necessary escape codes.
* haunt/builder/blog.scm (ugly-theme)[#:layout]: Add UTF-8 meta tag.

3 years agoRemove hardcoded Guile executable path.
David Thompson [Sun, 26 Jul 2015 19:18:19 +0000 (15:18 -0400)] 
Remove hardcoded Guile executable path.

* scripts/haunt: Now a build artifact.
* scripts/haunt.in: New file.
* configure.ac: Pre-process haunt.in.

3 years agoAdd GNU Guix development environment helper.
David Thompson [Sun, 19 Jul 2015 14:16:41 +0000 (10:16 -0400)] 
Add GNU Guix development environment helper.

* package.scm: New file.
* README.md: Document it.

3 years agoREADME: Add building instructions.
David Thompson [Sun, 19 Jul 2015 14:14:01 +0000 (10:14 -0400)] 
README: Add building instructions.

* README.md (Requirements, Building): New sections.

3 years agoAdd autotools bootstrap script.
David Thompson [Sun, 19 Jul 2015 14:02:53 +0000 (10:02 -0400)] 
Add autotools bootstrap script.

* bootstrap: New file.

4 years agobuilder: blog: Add theme type.
David Thompson [Wed, 15 Apr 2015 12:29:35 +0000 (08:29 -0400)] 
builder: blog: Add theme type.

* haunt/builder/blog.scm (<theme>): New record type.
  (theme, theme?, theme-name, theme-layout, theme-post-layout,
  theme-list-template, with-layout, render-post, render-list,
  date->string*): New procedures.
  (ugly-theme): Redefine as <theme>.
  (blog): Use <theme> object.

4 years agoAdd static asset support.
David Thompson [Tue, 14 Apr 2015 01:59:29 +0000 (21:59 -0400)] 
Add static asset support.

* haunt/asset.scm: New file.
* Makefile.am (SOURCES): Add it.
* haunt/site.scm (build-site): Add support for assets.
* haunt/utils.scm (file-name-components, join-file-name-components): New
  procedures.

4 years agoexample: Remove personal details.
David Thompson [Tue, 14 Apr 2015 00:29:00 +0000 (20:29 -0400)] 
example: Remove personal details.

* example/haunt.scm: Use made up metadata.

4 years agoREADME: Remove personal details from example configuration.
David Thompson [Tue, 14 Apr 2015 00:23:28 +0000 (20:23 -0400)] 
README: Remove personal details from example configuration.

* README.md (Example Configuration): Use made up domain/name/email address.

4 years agoREADME: Remove srfi-19 import from example configuration.
David Thompson [Tue, 14 Apr 2015 00:21:53 +0000 (20:21 -0400)] 
README: Remove srfi-19 import from example configuration.

* README.md (Example Configuration): Remove (srfi srfi-19).

4 years agoAdd example site.
David Thompson [Mon, 13 Apr 2015 23:53:39 +0000 (19:53 -0400)] 
Add example site.

* .gitignore: Ignore example build artifacts.
* example/haunt.scm: New file.
* example/posts/foo.sxml: New file.
* example/posts/bar.html: New file.

4 years agobuilder: Add primitive blog builder.
David Thompson [Mon, 13 Apr 2015 23:48:35 +0000 (19:48 -0400)] 
builder: Add primitive blog builder.

* haunt/builder/blog.scm: New file.
* Makefile.am (SOURCES): Add it.

4 years agopost: Add post-date procedure.
David Thompson [Mon, 13 Apr 2015 23:40:55 +0000 (19:40 -0400)] 
post: Add post-date procedure.

* haunt/post.scm (%default-date): New variable.
  (post-date): New procedure.
* haunt/builder/atom.scm (post->atom-entry): Use post-date.
* README.md (Example Configuration): Remove date from default metadata.

4 years agopost: Rename post->time to post-time.
David Thompson [Mon, 13 Apr 2015 23:24:20 +0000 (19:24 -0400)] 
post: Rename post->time to post-time.

* haunt/post.scm (post->time): Rename to...
  (post-time): ...this.

4 years agoREADME: Fix date in example config.
Arne Babenhauserheide [Mon, 13 Apr 2015 13:42:08 +0000 (15:42 +0200)] 
README: Fix date in example config.

* README.md: Add missing argument to make-date.  Use quasiquote and
  unquote to apply make-date.

4 years agoUpdate README.
David Thompson [Sun, 12 Apr 2015 14:24:19 +0000 (10:24 -0400)] 
Update README.

* README.md: Update intro.  Add example configuration and usage.

4 years agobuilder: Add Atom feed builder.
David Thompson [Sun, 12 Apr 2015 03:41:44 +0000 (23:41 -0400)] 
builder: Add Atom feed builder.

* haunt/builder/atom.scm: New file.
* Makefile.am (SOURCES): Add it.

4 years agohtml: Add sxml->html-string.
David Thompson [Sun, 12 Apr 2015 03:34:47 +0000 (23:34 -0400)] 
html: Add sxml->html-string.

* haunt/build/html.scm (sxml->html-string): New procedure.

4 years agopost: Add posts/group-by-tag.
David Thompson [Sun, 12 Apr 2015 03:34:23 +0000 (23:34 -0400)] 
post: Add posts/group-by-tag.

* haunt/post.scm (group-by-tag): New procedure.

4 years agoserve: web-server: Fix directory rendering.
David Thompson [Sun, 12 Apr 2015 03:30:59 +0000 (23:30 -0400)] 
serve: web-server: Fix directory rendering.

Paths were not being concatenated properly.

* haunt/server/web-server.scm (render-directory): Fix concat+uri-encode.

4 years agosite: Fix cleaning step before building.
David Thompson [Sun, 12 Apr 2015 03:29:20 +0000 (23:29 -0400)] 
site: Fix cleaning step before building.

Cleaning the build directory failed when a subdirectory existed.

* haunt/utils.scm (clean-directory): Remove.
  (delete-file-recursively): New procedure.
* haunt/site.scm (build-site): Use delete-file-recursively.

4 years agosite: Add 'domain' field.
David Thompson [Sun, 12 Apr 2015 02:46:08 +0000 (22:46 -0400)] 
site: Add 'domain' field.

* haunt/site.scm (<site>): Add 'domain' field.
  (make-site): New argument.
  (site-domain): New accessor.
  (site): Add 'domain' keyword argument.

4 years agoreader: Export html-reader and fix style.
David Thompson [Sun, 12 Apr 2015 02:32:49 +0000 (22:32 -0400)] 
reader: Export html-reader and fix style.

* haunt/reader.scm (html-reader): Export.  Use alist-cons to neaten up
  code.

4 years agopost: Add metadata parsers.
David Thompson [Sun, 12 Apr 2015 02:31:15 +0000 (22:31 -0400)] 
post: Add metadata parsers.

* haunt/post.scm (%metadata-parsers): New variable.  Register parser for
  'tags and 'date.
  (metadata-parser, register-metadata-parser!, parse-metadata): New
  procedures.

4 years agopost: Add helper procedures.
David Thompson [Sun, 12 Apr 2015 02:28:07 +0000 (22:28 -0400)] 
post: Add helper procedures.

* haunt/post.scm (post-slug, posts/reverse-chronological): New procedures.

4 years agoutils: Add take-up-to.
David Thompson [Sun, 12 Apr 2015 02:26:44 +0000 (22:26 -0400)] 
utils: Add take-up-to.

* haunt/utils.scm (take-up-to): New procedure.

4 years agoutils: Add string->date*.
David Thompson [Sun, 12 Apr 2015 02:25:40 +0000 (22:25 -0400)] 
utils: Add string->date*.

* haunt/utils.scm (string->date*): New procedure.

4 years agoconfig: Remove unneeded things.
David Thompson [Sat, 11 Apr 2015 22:36:43 +0000 (18:36 -0400)] 
config: Remove unneeded things.

* haunt/config.scm.in (%haunt-cwd, haunt-file-name,
  haunt-output-directory): Remove.

4 years agoui: Add "build" to command list.
David Thompson [Sat, 11 Apr 2015 22:31:54 +0000 (18:31 -0400)] 
ui: Add "build" to command list.

* haunt/ui.scm (commands): Add "build".

4 years agoui: Add 'build' subcommand.
David Thompson [Sat, 11 Apr 2015 21:54:55 +0000 (17:54 -0400)] 
ui: Add 'build' subcommand.

* haunt/ui/build.scm: New file.
* Makefile.am (SOURCES): Add it.

4 years agoreader: sxml-reader: Use absolute path when loading Scheme file.
David Thompson [Sat, 11 Apr 2015 21:53:44 +0000 (17:53 -0400)] 
reader: sxml-reader: Use absolute path when loading Scheme file.

* haunt/reader.scm (sxml-reader): Call 'load' with an absolute file
  name.

4 years agoserver: web-server: Fix directory view.
David Thompson [Sat, 11 Apr 2015 21:51:39 +0000 (17:51 -0400)] 
server: web-server: Fix directory view.

* haunt/serve/web-server.scm (request-path-components,
  request-file-name): New procedures.
  (render-directory): URI encode href attributes.  Properly concatenate
  file paths.
  (make-handler): Decode URI before using it as a relative file name.

4 years agoui: serve: Respect site configuration and default options.
David Thompson [Sat, 11 Apr 2015 21:48:19 +0000 (17:48 -0400)] 
ui: serve: Respect site configuration and default options.

* haunt/ui/serve.scm (%default-options): Fix alist.
  (haunt-serve): Use site config file to determine web server root.

4 years agoui: Fix load-config.
David Thompson [Sat, 11 Apr 2015 21:47:33 +0000 (17:47 -0400)] 
ui: Fix load-config.

* haunt/ui.scm (load-config): Use an absolute path when calling 'load'.
  Fix typo in error message.

4 years agosite: Tweak log output when building.
David Thompson [Sat, 11 Apr 2015 21:46:54 +0000 (17:46 -0400)] 
site: Tweak log output when building.

* haunt/site.scm (build-site): Change log message text.

4 years agoui: Remove use of defunct haunt-error.
David Thompson [Sat, 11 Apr 2015 19:31:36 +0000 (15:31 -0400)] 
ui: Remove use of defunct haunt-error.

* haunt/ui.scm (run-haunt-command): Remove call to 'haunt-error'.

4 years agopage: Ensure output directory exists before writing.
David Thompson [Sat, 11 Apr 2015 19:14:27 +0000 (15:14 -0400)] 
page: Ensure output directory exists before writing.

* haunt/utils.scm (mkdir-p): New procedure.
* haunt/page.scm (write-page): Create missing directories before writing.