aboutsummaryrefslogtreecommitdiff
path: root/haunt.scm
diff options
context:
space:
mode:
authorJakob L. Kreuze2024-07-13 18:04:05 -0400
committerJakob L. Kreuze2024-07-13 18:11:42 -0400
commit81c4d517735983a5afd6e9dc800257c761598527 (patch)
tree6b924707914d385126e6d330d2c628fd26f23a27 /haunt.scm
parent7f37518e4792f040a753a5d8d68d51e76cc0b2be (diff)
The `org' directory is no longer necessary
Diffstat (limited to 'haunt.scm')
-rw-r--r--haunt.scm65
1 files changed, 65 insertions, 0 deletions
diff --git a/haunt.scm b/haunt.scm
new file mode 100644
index 0000000..0611a07
--- /dev/null
+++ b/haunt.scm
@@ -0,0 +1,65 @@
+;;; Copyright © 2019 - 2020 Jakob L. Kreuze <zerodaysfordays@sdf.org>
+;;;
+;;; This program 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.
+;;;
+;;; This program 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 this program. If not, see
+;;; <http://www.gnu.org/licenses/>.
+
+(use-modules (haunt builder assets)
+ (haunt post)
+ (haunt reader)
+ (haunt site)
+ (jakob builder atom)
+ (jakob builder blog)
+ (jakob builder blogroll)
+ (jakob builder flat-pages)
+ (jakob builder htaccess)
+ (jakob builder outbox)
+ (jakob reader html-prime)
+ (jakob reader org-mode-prime)
+ (jakob theme)
+ (srfi srfi-19)
+ (srfi srfi-26))
+
+;; Replace Haunt's default 'string->date* function with one that recognizes the
+;; date format that Org uses.
+(define (org-string->date str)
+ "Convert STR, a string in Org format, into a SRFI-19 date object."
+ (catch 'misc-error
+ (lambda () (string->date str "<~Y-~m-~d ~a ~H:~M>"))
+ (lambda (key . parameters) (string->date str "<~Y-~m-~d ~a>"))))
+
+(register-metadata-parser! 'date org-string->date)
+
+(site #:title "Jakob's Personal Webpage"
+ #:domain "jakob.space"
+ #:default-metadata
+ '((author . "Jakob L. Kreuze")
+ (email . "zerodaysfordays@sdf.lonestar.org"))
+ #:make-slug post-slug-v2
+ #:readers (list html-reader-prime org-mode-reader-prime sxml-reader)
+ #:builders
+ (list (atom-feed #:max-entries 1024)
+ (blog)
+ (blogroll)
+ (htaccess #:error-documents '((400 . "/pages/status-400.html")
+ (403 . "/pages/status-403.html")
+ (404 . "/pages/status-404.html")
+ (429 . "/pages/status-429.html")
+ (500 . "/pages/status-500.html")))
+ (outbox)
+ (flat-pages "pages"
+ #:template (lambda (_site title content)
+ (theme #:title title #:content content))
+ #:prefix "pages/")
+ (static-directory "static")
+ (static-directory "posts-assets" "blog")))

© 2015 - 2026 Jakob L. Kreuze