David Thompson
5941c0d27b
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.
2015-07-26 22:35:29 -04:00
David Thompson
75430def43
html: Add punctuation to comment.
2015-07-26 22:29:57 -04:00
David Thompson
d919b527fc
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.
2015-07-26 22:27:24 -04:00
David Thompson
a123965c0c
Remove hardcoded Guile executable path.
...
* scripts/haunt: Now a build artifact.
* scripts/haunt.in: New file.
* configure.ac: Pre-process haunt.in.
2015-07-26 15:20:18 -04:00
David Thompson
88d3b34cce
Add GNU Guix development environment helper.
...
* package.scm: New file.
* README.md: Document it.
2015-07-19 10:16:41 -04:00
David Thompson
07d47e2568
README: Add building instructions.
...
* README.md (Requirements, Building): New sections.
2015-07-19 10:14:01 -04:00
David Thompson
5150d32030
Add autotools bootstrap script.
...
* bootstrap: New file.
2015-07-19 10:02:53 -04:00
David Thompson
5a0c70f145
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.
2015-04-15 08:29:35 -04:00
David Thompson
1f1784f9f1
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.
2015-04-13 21:59:29 -04:00
David Thompson
395b510a6d
example: Remove personal details.
...
* example/haunt.scm: Use made up metadata.
2015-04-13 20:29:00 -04:00
David Thompson
9e6a3efd68
README: Remove personal details from example configuration.
...
* README.md (Example Configuration): Use made up domain/name/email address.
2015-04-13 20:23:28 -04:00
David Thompson
0c4e28c502
README: Remove srfi-19 import from example configuration.
...
* README.md (Example Configuration): Remove (srfi srfi-19).
2015-04-13 20:21:53 -04:00
David Thompson
fdb70223a7
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.
2015-04-13 19:53:39 -04:00
David Thompson
913c6bed6f
builder: Add primitive blog builder.
...
* haunt/builder/blog.scm: New file.
* Makefile.am (SOURCES): Add it.
2015-04-13 19:50:06 -04:00
David Thompson
3592829387
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.
2015-04-13 19:43:35 -04:00
David Thompson
3614b3e9b9
post: Rename post->time to post-time.
...
* haunt/post.scm (post->time): Rename to...
(post-time): ...this.
2015-04-13 19:24:20 -04:00
Arne Babenhauserheide
87aaae2585
README: Fix date in example config.
...
* README.md: Add missing argument to make-date. Use quasiquote and
unquote to apply make-date.
2015-04-13 17:52:34 -04:00
David Thompson
ba85e9e6c7
Update README.
...
* README.md: Update intro. Add example configuration and usage.
2015-04-12 10:24:19 -04:00
David Thompson
c529bbd0bd
builder: Add Atom feed builder.
...
* haunt/builder/atom.scm: New file.
* Makefile.am (SOURCES): Add it.
2015-04-11 23:41:44 -04:00
David Thompson
fc06ea3d9d
html: Add sxml->html-string.
...
* haunt/build/html.scm (sxml->html-string): New procedure.
2015-04-11 23:34:47 -04:00
David Thompson
44fdd16202
post: Add posts/group-by-tag.
...
* haunt/post.scm (group-by-tag): New procedure.
2015-04-11 23:34:23 -04:00
David Thompson
390980cf5c
serve: web-server: Fix directory rendering.
...
Paths were not being concatenated properly.
* haunt/server/web-server.scm (render-directory): Fix concat+uri-encode.
2015-04-11 23:30:59 -04:00
David Thompson
06321fbdd8
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.
2015-04-11 23:29:20 -04:00
David Thompson
325ecc7934
site: Add 'domain' field.
...
* haunt/site.scm (<site>): Add 'domain' field.
(make-site): New argument.
(site-domain): New accessor.
(site): Add 'domain' keyword argument.
2015-04-11 22:46:08 -04:00
David Thompson
5f7a963c17
reader: Export html-reader and fix style.
...
* haunt/reader.scm (html-reader): Export. Use alist-cons to neaten up
code.
2015-04-11 22:33:55 -04:00
David Thompson
84c65348ea
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.
2015-04-11 22:33:54 -04:00
David Thompson
2464d9d06b
post: Add helper procedures.
...
* haunt/post.scm (post-slug, posts/reverse-chronological): New procedures.
2015-04-11 22:33:54 -04:00
David Thompson
c2191a68f2
utils: Add take-up-to.
...
* haunt/utils.scm (take-up-to): New procedure.
2015-04-11 22:33:54 -04:00
David Thompson
35bb74497d
utils: Add string->date*.
...
* haunt/utils.scm (string->date*): New procedure.
2015-04-11 22:33:54 -04:00
David Thompson
2e136d15a5
config: Remove unneeded things.
...
* haunt/config.scm.in (%haunt-cwd, haunt-file-name,
haunt-output-directory): Remove.
2015-04-11 18:37:24 -04:00
David Thompson
db0f607f28
ui: Add "build" to command list.
...
* haunt/ui.scm (commands): Add "build".
2015-04-11 18:31:54 -04:00
David Thompson
210e58c2ba
ui: Add 'build' subcommand.
...
* haunt/ui/build.scm: New file.
* Makefile.am (SOURCES): Add it.
2015-04-11 17:54:55 -04:00
David Thompson
be627c2cab
reader: sxml-reader: Use absolute path when loading Scheme file.
...
* haunt/reader.scm (sxml-reader): Call 'load' with an absolute file
name.
2015-04-11 17:53:44 -04:00
David Thompson
ad9c4b23dd
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.
2015-04-11 17:53:00 -04:00
David Thompson
46d38aab9d
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.
2015-04-11 17:48:19 -04:00
David Thompson
33d7c84e88
ui: Fix load-config.
...
* haunt/ui.scm (load-config): Use an absolute path when calling 'load'.
Fix typo in error message.
2015-04-11 17:47:33 -04:00
David Thompson
40b8242554
site: Tweak log output when building.
...
* haunt/site.scm (build-site): Change log message text.
2015-04-11 17:46:54 -04:00
David Thompson
c7d98392ef
ui: Remove use of defunct haunt-error.
...
* haunt/ui.scm (run-haunt-command): Remove call to 'haunt-error'.
2015-04-11 15:33:56 -04:00
David Thompson
d4ff34e712
page: Ensure output directory exists before writing.
...
* haunt/utils.scm (mkdir-p): New procedure.
* haunt/page.scm (write-page): Create missing directories before writing.
2015-04-11 15:16:33 -04:00
David Thompson
3320a67edb
ui: Improve option processing and help output.
...
* haunt/ui.scm (%common-options, %default-common-options): New
variables.
(simple-args-fols, show-common-options-help, leave, string->number*,
load-config): New procedures.
(haunt-error): Remove.
(show-version-and-exit): Actually exit. Add 'name' argument.
(haunt-main): Use new 'show-version-and-exit'.
* haunt/ui/serve.scm (show-server-help): Remove.
(show-help): New procedure.
(%options, %default-options): New variables.
(haunt-serve): Use SRFI-37 option processing.
2015-04-11 15:10:46 -04:00
David Thompson
11a3e70657
site: Add build-site procedure.
...
* haunt/utils.scm (absolute-file-name, clean-directory): New procedures.
* haunt/site.scm (build-site): New procedure.
2015-04-11 15:10:46 -04:00
David Thompson
7c7b161885
page: Change sxml field to contents.
...
Naming the field 'sxml' is a poor choice because it may contain any type
of data that the writer procedure accepts.
* haunt/page.scm (<page>): Replace 'sxml' field with 'contents'.
(page-sxml): Delete accessor.
(page-contents): New accessor.
(write-page): s/sxml/contents/
2015-04-11 15:10:45 -04:00
David Thompson
4d99832b6b
reader: Add read-posts procedure.
...
* haunt/reader.scm (read-posts): New procedure.
2015-04-11 15:10:45 -04:00
David Thompson
a45269f523
reader: Add html-reader.
...
* haunt/reader.scm (read-html-post): New procedure.
(html-reader): New variable.
2015-04-11 15:10:45 -04:00
David Thompson
0b5bdd9f01
Add utils module.
...
* haunt/utils.scm: New file.
* Makefile.am (SOURCES): Add it.
2015-04-11 15:10:45 -04:00
David Thompson
65c6ca5f0b
reader: Remove stray 'n'.
...
* haunt/reader.scm: Remove stray 'n' character.
2015-04-11 08:44:28 -04:00
David Thompson
e5d6d820ae
Add site module.
...
* haunt/site.scm: New file.
* Makefile.am (SOURCES): Add it.
2015-04-11 08:36:35 -04:00
David Thompson
e3a548b777
Add SXML to HTML conversion module.
...
* haunt/build/html.scm: New file.
* Makefile.am (SOURCES): Add it.
2015-04-10 23:44:21 -04:00
David Thompson
aa7aae9d3e
Add page module.
...
* haunt/page.scm: New file.
* Makefile.am (SOURCES): Add it.
2015-04-10 23:39:07 -04:00
David Thompson
dda114b410
Add reader module.
...
* haunt/reader.scm: New file.
* Makefile.am (SOURCES): Add it.
2015-04-10 23:37:42 -04:00