all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pukkamustard <pukkamustard@posteo.net>
To: Joshua Branson <jbranso@dismail.de>
Cc: help-guix@gnu.org
Subject: Re: Customizing Haunt to work with Skribilio
Date: Tue, 18 Aug 2020 08:54:30 +0200	[thread overview]
Message-ID: <86sgckxx3t.fsf@posteo.net> (raw)
In-Reply-To: <87mu2t9h70.fsf@dismail.de>


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.


  reply	other threads:[~2020-08-18  6:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 19:59 Customizing Haunt to work with Skribilio Joshua Branson
2020-08-18  6:54 ` pukkamustard [this message]
2020-08-18 15:38   ` Joshua Branson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86sgckxx3t.fsf@posteo.net \
    --to=pukkamustard@posteo.net \
    --cc=help-guix@gnu.org \
    --cc=jbranso@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.