Tutorial question

18 views
Skip to first unread message

David Christiansen

unread,
May 10, 2022, 1:35:51 PMMay 10
to hakyll
Hello! Thanks for Hakyll!

The tutorial page at https://jaspervdj.be/hakyll/tutorials/03-rules-routes-compilers.html asked for feedback to be submitted here, so that's what I'm doing.

On that page, I think the text describing each of the three concepts is pretty easy to follow, but I'm really missing a sort of high-level overview of how they relate to one another.

Here's what I've reverse-engineered from the text on the page and from the Haddocks: a Hakyll site consists of a Haskell program and some data files. The Haskell program will, when run, read the data files and emit a static website. This Haskell program implements a build system, and tries to minimally rebuild the site in response to changes in the data files.

As I understand it, a rule declares a dependency between the data files and the generated site. There are two kinds of dependencies: those that should be triggered when data files change (match rules) and those that should just run (create rules). Within a rule, a route selects the address in the resulting site at which the resulting data should be stored, and a compiler specifies the actual content of the data.

Is this a basically correct understanding? Would it make sense to add an overview along these lines to the top of that tutorial page? Did I miss it somewhere else?

Thanks again for the nice tool!

/David

Mel Pullen

unread,
May 10, 2022, 4:35:30 PMMay 10
to hak...@googlegroups.com
A diagram to go with it would help. I've made hakyll my test website tool and made some small changes but wish I could find my way through the confusion of it being a DSL. 

You explained a little bit that it's actually three things. It seems to assume a structure of your generated site and that's a blog post site. I'm sure it could be used to do more. I managed to add a timed pop up, but probably not in a very Haskell way.



--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hakyll/840579e3-a64b-42dc-bb4d-3af5456a0a64n%40googlegroups.com.


--
--------------------------------------------
Q: Why is this email three sentences or less?
A: http://three.sentenc.es

Jasper Van der Jeugt

unread,
May 18, 2022, 6:05:44 AMMay 18
to hak...@googlegroups.com
Hi David,

Your high level understanding is correct.  Maybe I would describe `match` rules as having a file dependency, and `create` has none.  But the result is pretty much the same!  I’ll see if I can add something like this to the tutorial (or feel free to send a PR if you find the time).

Warm regards 
Jasper

--

David Christiansen

unread,
May 25, 2022, 3:32:22 AMMay 25
to hak...@googlegroups.com
Hi Jasper,

Thank you for the confirmation!

I guess what I really feel like I'm missing from the docs (whether it be Haddock or the tutorials) is a high-level description of what the concepts are and how they relate, and what it is that Hakyll actually does when running. The "cookbook" examples are very useful, but they haven't helped me build up much understanding for what's going on behind the scenes. I don't feel like I'm quite in a position to write such an overview, unfortunately!

I appreciate the help.

David

You received this message because you are subscribed to a topic in the Google Groups "hakyll" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hakyll/5pbjkkSyvZc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hakyll+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hakyll/CAAJvgDBL-_J%3DbgJpR5fcny-zxJfd6TfgVHpzRHJqr-6voDFm1A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages