Hi Joshua,
I am trying to use the lovely haunt static site generator with
Skribilio!
Cool! I've been tinkering with the same idea the last couple of
days.
In particular using the Skribilo outline reader to build websites
from
org-mode files with haunt.
But I am still getting an error message:
#+BEGIN_SRC sh
joshua@dobby ~/prog/org/projects/generate-income/client-site$
haunt build
building pages in 'site'...
Backtrace:
5 (primitive-load
"/gnu/store/4vvbcxrqjm8dbc1g1gk9pakqgf7…")
In haunt/ui.scm:
124:6 4 (run-haunt-command _ . _)
In haunt/ui/build.scm:
60:4 3 (haunt-build . _)
In haunt/site.scm:
100:19 2 (build-site #<<site> title: "Built with Guile"
domain: …>)
In ice-9/ftw.scm:
482:39 1 (loop _ _ #(2050 2907188 16877 2 1000 998 0 4096 #
# …) …)
In unknown file:
0 (scm-error misc-error #f "~A ~S" ("no reader
availa…" …) …)
ERROR: In procedure scm-error:
no reader available for post: "posts/jolly-good-day.skr"
#+END_SRC
What am I doing wrong?
You need to add the `skribe-reader` to the list of readers in your
site configuration:
```
#:readers (list commonmark-reader skribe-reader)
```
Haunt does not use Skribilo and it is not necessary to add
skribilo as
input when building haunt. Haunt has it's own parser for the
skribe
format
(https://git.dthompson.us/haunt.git/tree/haunt/reader/skribe.scm).
The problem is that haunt does not know what to do with the *.skr
file
("no reader available").
I've been doing some poking around into using Skribilo directly
from
haunt. This is the basic idea:
```
(define-module (my-skribilo-reader)
#:use-module (haunt reader)
#:use-module (skribilo reader outline))
;; Make a haunt reader
(define haunt-outline-reader
(make-reader
(make-file-extension-matcher "org")
(lambda (file)
(let ((outline-reader (make-outline-reader))) ; This is the
Skribilo reader
(do-some-processing-to-create-a-haunt-post
(with-input-from-file file outline-reader))))))
```
Hope that helps,
-pukkamustard
PS: Would you be interested in porting Skribilo to Guile 3.0? I'm
struggling with that and could use some help.